我想提交我的自定义选择字段,并在结帐表单中选择多个选项,但是它仅返回第一个索引?

时间:2019-07-11 06:39:19

标签: opencart opencart2.x opencart-3 opencart-module opencart2.3

这是我的html

<select multiple="multiple" name="billing_address[multi_select_colours_custom][]" id="input-payment-multi-select-colours" class="form-control" required="">
<option value="blue">Blue</option>
<option value="white">White</option>
<option value="red">Red</option>
<option value="brown">Brwon</option>
<option value="gray">Gray</option>
</select>

这是opencart ajax数据对象

$.ajax({
        url: 'index.php?route=checkout/payment_address/save',
        type: 'post',
        data: $('#collapse-payment-address input[type=\'text\'], #collapse-payment-address input[type=\'date\'], #collapse-payment-address input[type=\'datetime-local\'], #collapse-payment-address input[type=\'time\'], #collapse-payment-address input[type=\'password\'], #collapse-payment-address input[type=\'checkbox\']:checked, #collapse-payment-address input[type=\'radio\']:checked, #collapse-payment-address input[type=\'hidden\'], #collapse-payment-address textarea, #collapse-payment-address select'),

...

0 个答案:

没有答案