serialize doesn't include hidden fields

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.


You need set the name attribute and check the disabled attribute! The disabled field also not serialized.