marioizquierdo / jquery.serializeJSON

Serialize an HTML Form to a JavaScript Object, supporting nested attributes and arrays.
MIT License
1.72k stars 431 forks source link

Option includeDisabled #119

Open fglueck opened 3 years ago

fglueck commented 3 years ago

If "true" also disabled :input items are included.

marioizquierdo commented 3 years ago

Thank you. Could you elaborate why this option would be useful? We would also need tests to cover the new use-case. I can review the docs and code comments after that.

fglueck commented 3 years ago

This option is usefull in follow case. If you have "default"-values on server side for paramerts/values that are comes from a form than you have a problem if some parameters not allways submited. The same problem you have with not sended checkboxes or not sended select multiple. You can't detect the difference between, is the parameter not sendet or is it switched off/unselected.