【发布时间】:2014-12-09 20:55:17
【问题描述】:
所以我正在使用 Select2 插件,并且无法在表单中发布多个选项。我可以选择多个选项,但只能通过一个:
<form>
<select multiple name="message-from-select" id="message-from-select" class="select2">
<option value="janedoen@example.com">janedoen@example.com</option>
<option value="antonius@example.com" selected="selected">antonius@example.com</option>
<option value="michael@example.com" selected="selected">michael@example.com</option>
<option value="bayjack@example.com">bayjack@example.com</option>
<option value="stacy@example.com">stacy@example.com</option>
</select>
</form>
在我的 PHP 页面上,当我选择多个选项后 var_dump 时:
var_dump($_POST['message-from-select']);
我只有一个字符串通过,即:
string 'michael@example.com' (length=19)
我需要转到隐藏的输入格式吗?
【问题讨论】:
标签: php jquery select post jquery-select2