Woocommerce Checkout Custom Fields

时间:2017-10-12 10:03:52

标签: php wordpress woocommerce

I am trying to use multidimensional input fields in woocommerce checkout, I've added all of the fields but when I submit checkout it gives me an error SyntaxError: Unexpected token < in JSON at position 0

Given below is my code:

<div class="col_1">
    <h5> Guest Name <span style="color:red"> * </span> </h5>
    <input type="text" class="input-text " name="tm_guests[1][tm_order_meta_guest_name]" placeholder="" value="">

    <h5> Contact Number </h5>
    <input type="text" class="input-text " name="tm_guests[1][tm_order_meta_contact_number]" placeholder="" value="">

    <h5> Date of birth </h5>
    <input type="text" class="input-text " name="tm_guests[1][tm_order_meta_dob]" placeholder="" value="">
</div>

I have checked if everything else is working fine by removing the multidimensional inputs and it works fine, but its not working with multidimensional inputs

The reason for me to do this is that I am cloning these fields via jQUery on frontend, so there would be X number of guests

0 个答案:

没有答案