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\
autoNumeric("getArray")
no longer works.
unformatOnSubmit: true
does not seem to work when form is submitted with Ajax using serializeArray().
Instead use formArrayFormatted
to get the equivalent serialised data of form.serializeArray()
Just get any AutoNumeric initialised element from the form and call the method. It will serialise the entire form including non-autonumeric inputs.
$.ajax({
type: "POST",
url: url,
data: AutoNumeric.getAutoNumericElement("#anyElement").formArrayFormatted(),
)};