So I am using the Select2 plugin, and am having trouble posting multiple options in a form. I am able to select multiple options but can only pass one through:
<form>
<select multiple name="message-from-select" id="message-from-select" class="select2">
<option value="[email protected]">[email protected]</option>
<option value="[email protected]" selected="selected">[email protected]</option>
<option value="[email protected]" selected="selected">[email protected]</option>
<option value="[email protected]">[email protected]</option>
<option value="[email protected]">[email protected]</option>
</select>
</form>
On my PHP page, when I var_dump after selecting multiple options:
var_dump($_POST['message-from-select']);
I only get one string coming through, i.e.:
string '[email protected]' (length=19)
Do I need to go to a hidden input format?