How can I remove AutoNumeric formatting before submitting form?

后端 未结 11 2968
栀梦
栀梦 2021-02-19 05:26

I\'m using the jQuery plugin AutoNumeric but when I submit a form, I can\'t remove the formatting on the fields before POST.

I tried to use $(\'input\

11条回答
  •  -上瘾入骨i
    2021-02-19 06:14

    Use the get method.

    'get' | returns un-formatted object via ".val()" or ".text()" | $(selector).autoNumeric('get');


    
    
    

    This will always submit "15". Now get creative :)


    Mirrored raw value:

    The in submit.php ignore the value for my_field_formatted and use my_field instead.

提交回复
热议问题