I am trying to create a form which triggers emails to be sent to multiple email addresses, based on users input. I need to use check boxes for the multiple selection.
I have experimented with the select method of email address selection and this works, but does not provide the user with the opportunity to make multiple selections.
My form with check boxes does not actually send any emails.
Which ever method I use, select or check box, my results page contains the correct email addresses, separated by commas, but the emails are never sent.
Any help gratefully received.
Thanks
Andy
PS: I posted the question in the wrong location before and have moved it to the Revo 2.2 specific forum. Apologies if you have read it before.
The Form using check boxes - THIS DOES NOT SEND EMAILS BUT DOES RETURN THE CORRECT INFO ON SUCCESS PAGE
<form action="" method="post">
<label for="name">Name:</label>
<input type="text" name="name" id="name" value="[[!+fi.name]]">
<label for="email">Email</label>
<input type="text" name="email" id="email" value="[[!+fi.email]]">
<label>Address Emails To [[!+fi.error.addressTo]]</label>
<input type="hidden" name="addressTo[]" value="" />
<input type="checkbox" name="addressTo[]" value="[email protected]" [[!+fi.addressTo:FormItIsChecked=`[email protected]`]] > Andy
<input type="checkbox" name="addressTo[]" value="[email protected]" [[!+fi.addressTo:FormItIsChecked=`[email protected]`]] > Info
<input type="submit" value="Submit">
</form>
[[!FormIt? &validate=`addressTo:required`
&store=`1`
&hooks=`email,redirect`
&emailFrom=`[email protected]`
&emailTpl=`myEmailChunk2`
&emailTo=`[[+addressTo]]`
&emailSubject=`My First FormIt Form`
&emailMultiSeparator=`,`
&redirectTo=`4`
]]
The Form using select - THIS DOES SEND EMAILS AND RETURNS THE CORRECT INFO ON SUCCESS PAGE
<form action="" method="post">
<label for="name">Name:</label>
<input type="text" name="name" id="name" value="[[!+fi.name]]">
<label for="email">Email</label>
<input type="text" name="email" id="email" value="[[!+fi.email]]">
<select name="addressTo">
<option value="[email protected]" [[!+fi.addressTo:FormItIsSelected=`[email protected]`]]>Andy</option>
<option value="[email protected]" [[!+fi.addressTo:FormItIsSelected=`[email protected]`]]>Info</option>
</select>
<input type="submit" value="Submit">
</form>
[[!FormIt? &validate=`addressTo:required`
&emailMultiSeparator=`,`
&store=`1`;
&hooks=`email,redirect`
&emailFrom=`[email protected]`
&emailTpl=`myEmailChunk`
&emailTo=`[[+addressTo]]`
&emailSubject=`My First FormIt Form`
&redirectTo=`4`
]]
Success Page - THIS WORKS FOR BOTH THE SELECT AND CHECKBOX PAGES
[[!FormItRetriever]]
Hello [[!+fi.name]] thanks for submitting this form. <br />
An email will be sent to [[!+fi.addressTo]] informing them of your request<br />