I know the defined behavior for web forms is to not submit disabled fields… but that’s not the definition I want. I want to use ajax to post the form and I want it to get all fields, even if they are disabled. I don’t want to build a workaround where I make the field “look disabled”… or have to hack it where I enable the fields -> post -> disable.
is it possible to make ajaxSubmit() or serialize() grab the disabled fields as it’s moving through the DOM and grabbing values? or is there another serialize plugin out there that can do this? or does someone have a mod I can make to one of these plugins to make it work?
or am I doomed to hack it?
You can make your fields readonly, this will disallow changes to the value of your controls.
Edit: You could easily write a “serializeDisabled” function, iterating over the disabled form elements which have a name attribute and using the jQuery.param function at the end, to generate the serialized string: