I do have an html/php e-mail form with various fields and checkboxes.
All working well, except that I can’t get one multiple select box working. The selected values are not being carried over to the e-mail”
the html form:
<label for="mydropdown">My Dropdown Text</label>
<select id="mydropdown" name="mydropdown[]" multiple size="6">
<option value="Value 1" <?php echo ($sr && !$cf['form_ok'] && $cf['posted_form_data']['mydropdown'] == 'Value1') ? "selected='selected'" : '' ?>>Value1</option>
<option value="Value2" <?php echo ($sr && !$cf['form_ok'] && $cf['posted_form_data']['mydropdown'] == 'Value2') ? "selected='selected'" : '' ?>>Value2</option>
</select>
Part of the process.php
$mydropdown= $_POST['mydropdown[]'];
$ticketbody = <p><strong>MyDropdown: </strong> {$mydropdown} </p>
$returndata = array(
'posted_form_data' => array(
'mydropdown' => $mydropdown
I’m sure I am doing something wrong with the array, but I’m quite unsure what’s the root cause.
2