Hi,
Using v4 for the first time - love it. I've got the problem however that my checkbox array will not display in the email that is sent from the form. I've looked over these two posts but can't get it working:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=12172&p=20923&hilit=check+box+group#p20923
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=11234&p=14415&hilit=check+box+group#p14415
Here's my form code:
And I'm putting this in my email template:
And the result in the email is: {instructions[]}
What am I missing?
EDIT: The user needs to be able to select one, several, or all of the check boxes - with a validation that at least one is selected.
Using v4 for the first time - love it. I've got the problem however that my checkbox array will not display in the email that is sent from the form. I've looked over these two posts but can't get it working:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=12172&p=20923&hilit=check+box+group#p20923
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=11234&p=14415&hilit=check+box+group#p14415
Here's my form code:
<h2>Instructions:</h2>
<div class="ccms_form_element cfdiv_checkboxgroup" id="instructions_container_div">
<h4>By Subpoena</h4>
<input type="checkbox" name="instructions[]" id="instructions_admissable" title="" value="admissable" class="validate['group[1]']">
<label for="instructions_admissable">Admissable</label><br /><br />
<input type="checkbox" name="instructions[]" id="admissable_affidavit" title="" value="admissable_affidavit" class="validate['group[1]']">
<label for="instructions_admissable">Admissable with Affidavit</label><br /><br />
<input type="checkbox" name="instructions[]" id="instructions_inadmissable" title="" value="inadmissable" class="validate['group[1]']">
<label for="instructions_inadmissable">Inadmissable with Affidavit</label><br /><br />
<h4>By Authorization</h4>
<input type="checkbox" name="instructions[]" id="instructions_affidavit" title="" value="affidavit" class="validate['group[1]']">
<label for="instructions_affidavit">With Affidavit*</label>
<div class="clear"></div><div id="error-message-instructions"></div></div>
And I'm putting this in my email template:
{instructions[]}
And the result in the email is: {instructions[]}
What am I missing?
EDIT: The user needs to be able to select one, several, or all of the check boxes - with a validation that at least one is selected.
Hi ironlion37,
Please replace {instructions[]} with {instructions} in the template and drag a 'Handle Arrays' action into the OnSubmit event (and then up so that it is before the Email action). The Handle Arrays event will convert the array result from the form into a string for use in the Email template or saving to the database.
Bob
Please replace {instructions[]} with {instructions} in the template and drag a 'Handle Arrays' action into the OnSubmit event (and then up so that it is before the Email action). The Handle Arrays event will convert the array result from the form into a string for use in the Email template or saving to the database.
Bob
Thank you Greyhead. Works perfectly.
This topic is locked and no more replies can be posted.