I have 10 divs with forms inside of them and I need to get all the email inputs, that have a checkbox checked, inside that form. Below is a sample of each html block, I have 10 in total.
<form id="realtor10">
<input id="chckbox" type="checkbox" name="mycheckbox" value="10" />
<div id="realtor10">
<div id="realtor10image"><img src="wp-content/themes/top10realtors/_image.jpg" alt="realtor10image" /></div>
<div id="rightarea">
<div id="realtor10logo"><img src="wp-content/themes/top10realtors/_logo.jpg" alt="realtor10logo" width="200" height="100" /></div>
<div id="realtor10name">Realtor #10</div>
<div id="realtor10email"><a href="#">(your email address here)</a></div>
<div id="realtor10phone">(your phone number here)</div>
</div>
</div>
</form>
My goal is to be able to send an email to each email address that has, it’s checkbox checked.
Assuming that all the email addresses are entered into form fields that end with the string
email:Bear in mind that this will still need validating (ideally client and server-side, but, certainly server-side prior to storage in the database) and submission to the database.