I run serialize on a form, where on of the fields is hidden - and it's a very important field, which should be posted. Is there any way to easily serialize it through jQuery or should I write my own function?
Serialize does include all enabled input
elements with a name
attribute.
Maybe combining the two in a single selector would work?
$(":input,:hidden").serialize();
edit: I just tried the above and it worked. but, $("form").serialize(); should automatically take all inputs as others have mentioned.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With