submit disabled fields

后端 未结 8 1595
无人及你
无人及你 2020-12-03 04:34

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 ge

8条回答
  •  庸人自扰
    2020-12-03 05:06

    OK... perhaps I didn't ask my question clearly enough... but the answer I was looking for is here:

    http://docs.jquery.com/Plugins:Forms#.val.28.29_becomes_.fieldValue.28.29

    I mentioned ajaxSubmit() in my question, which comes from the jQuery Form plugin... and inside that plug-in there is a method called fieldValue() which accepts a parameter called "successful". If you pass in "true" then the plug-in only returns what the W3C defines as "successful" controls (which excludes disabled controls). but if you set it to false, then it will get all values, regardless of W3C definition.

    I knew this was possible, since the entire submission is controlled by the plug-in and has nothing to do with the HTML standards/definition... I was just asking to see if this option was already available in this plug-in or other plugins. It is available in this plugin, although the default behavior is to act like a standard HTML submit

提交回复
热议问题