Hello,
I created a new form and have a few areas where the questions have a lsit box where you can select more than one answer. Shown below:
Now, typically I would make my email template like so:
This will not give me the results if more than one item is selected. What do I need to do to show all items selected in the email template? Thanks.
I created a new form and have a few areas where the questions have a lsit box where you can select more than one answer. Shown below:
What activities did your child(ren) like best? (select all that apply)<br/>
<select name="Favorite_Activities" multiple="" size="7">
<option value="Craft Tent">Craft Tent</option>
<option value="Recycled Crafts">Recycled Crafts</option>
<option value="Reptile Exhibit">Reptile Exhibit</option>
<option value="Inflatable Slide">Inflatable Slide</option>
<option value="Trackless Train">Trackless Train</option>
<option value="Small Bounce">Small Bounce</option>
<option selected="" value="Pony Rides">Pony Rides</option>
</select>
Now, typically I would make my email template like so:
24. What activities did your child(ren) like best? <b>{Favorite_Activities}</b><br />
This will not give me the results if more than one item is selected. What do I need to do to show all items selected in the email template? Thanks.
Hi Mangotti,
Make the field name into an array name[code]name="field_name[]"/code] and then it will keep multiple values. There are some posts here on the forums about un-packing and displaying these - search on 'Sofia' if my memory serves me correctly.
Bob
Late, sorry, fixed a couple of typos in there.
Make the field name into an array name[code]name="field_name[]"/code] and then it will keep multiple values. There are some posts here on the forums about un-packing and displaying these - search on 'Sofia' if my memory serves me correctly.
Bob
Late, sorry, fixed a couple of typos in there.
Okay. I changed the form to look like this:
I searched for 'Sofia" but did not find what I was looking for. I'll search again.
What activities did your child(ren) like best? (select all that apply)<br/> <select name=Favorite_Activities[] multiple="" size="7">
<option value="Craft Tent">Craft Tent</option>
<option value="Recycled Crafts">Recycled Crafts</option>
<option value="Reptile Exhibit">Reptile Exhibit</option>
<option value="Inflatable Slide">Inflatable Slide</option>
<option value="Trackless Train">Trackless Train</option>
<option value="Small Bounce">Small Bounce</option>
<option selected="" value="Pony Rides">Pony Rides</option>
</select>
I tested the form and I did not get the correct results.
I searched for 'Sofia" but did not find what I was looking for. I'll search again.
I feel stupid. I left out the quotes. This is what I'm using now.
What activities did your child(ren) like best? (select all that apply)<br/> <select name="Favorite_Activities[]" multiple="" size="7">
<option value="Craft Tent">Craft Tent</option>
<option value="Recycled Crafts">Recycled Crafts</option>
<option value="Reptile Exhibit">Reptile Exhibit</option>
<option value="Inflatable Slide">Inflatable Slide</option> <option value="Trackless Train">Trackless Train</option>
<option value="Small Bounce">Small Bounce</option>
<option selected="" value="Pony Rides">Pony Rides</option>
</select>
Works so far.
Hi magotti,
The code you need to display or save this is
Bob
The code you need to display or save this is
<?php
$_POST['field_name'] = implode(', ', $_POST['field_name']);
?>
This will covert the array into a comma separated string.
Bob
Inserting the code you recommended in the OnSubmit area?
Currently it is not there but my email template is returning the results with commas. Do I still need to add the POST code?
Currently it is not there but my email template is returning the results with commas. Do I still need to add the POST code?
This topic is locked and no more replies can be posted.