I am working on a contact form that is not posting my multiple selection answers correctly. I am using PHPMailer-FE to send the form results. PHPMailer-FE contains a php class file, configuration script, and TPL file.
I am encountering a problem with Ryan Cramer’s jquery.amselect.js widget where the word “Array” is being sent in the email instead of a comma separated list of selected values.
Here is an example of the amselect widget in action:
http://www.ryancramer.com/projects/asmselect/examples/example1.html.
Here’s the HTML:
<select style="width: 200px !important;" id="cards" name="cards[]" multiple="multiple" title="Choose All That Apply" >
<option value="Visa">Visa</option>
<option value="Mastercard">Mastercard</option>
<option value="Amex">American Express</option>
<option value="Discover">Discover</option>
<option value="Diners">Diner's Club</option>
<option value="JCB">JCB</option>
<option value="Visa-Delta">Visa Debit/Delta</option>
<option value="Switch-Maestro">Switch/Maestro</option>
<option value="solo">solo</option>
<option value="Visa-Electron">Visa Electron</option>
</select>
Thanks to @aSeptik, I now understand to fix the issue we can use the implode tag. In his working demo the php is included at the top of the HTML file:
$message .= implode(', ',$_POST['cards']);
I have tried using the implode tag in my TPL or class file with no success.
Any assistance would be much appreciated I am working very hard to fix this problem. Many thanks! Regards, Nolan
UPDATED: ( PHPMailer-FE + amselect Example )