Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • 20
    It would make it a lot easier to store information in DB. Because then the number of fields from Serialize would equal the number of fields in table. Now I have to contrll which ones are missing.
    – Steven
    Commented Jun 13, 2010 at 10:59
  • 19
    There is a perfectly good case for wanting unchecked checkboxes and unset radiobuttons. The values for these fields may already exist on the server, and you merely want to update. By not having these values in your submit string, it assumes that you are doing a complete overwrite of the record each time. Commented Aug 18, 2011 at 10:37
  • 4
    @mydog: why would that ever be the case? It seems like a poor design choice if you ask me. Those fields would never be in the query string if the browser was submitting the form data, so why would you design it to be different for JavaScript? You'd completely eliminate any chance of graceful degradation, for a start.
    – Andy E
    Commented Aug 18, 2011 at 13:35
  • 1
    @AndyE Sometimes you have a server that requires all the options to be explicit. Why would this be a rare case?
    – Glenn
    Commented Feb 12, 2013 at 2:28
  • 1
    HTML should behave as a view and not make decisions about what data is sent to a "Controller". How the data is interpreted should be the responsibility of the "Controller" - the thing handling the form post.
    – muglio
    Commented May 19, 2015 at 6:31