This handy jQuery extension provides support for client side form and data gathering. serializeObject() returns a JavaScript object comprising of key/value pairs from submitted form. This allows form data to be accessed from a single source without having to gather each value individually.

Providing inputs have a name attribute set, all inputs in the selected form will be automatically collected and added to the returned object. This can be helpful tool for validation and/or working with other event based functionality in JavaScript.

Supported (and tested) form elements:

  • text
  • radio
  • checkbox
  • select
  • multiselect
  • datalist
  • number(spinner)
  • range(slider)
  • date
  • time

As most HTML5 form inputs natively behave as “text” elements, these naturally are supported. Also supported are the more specific inputs such as radios, checkboxes, multiselects which behave differently when serialized (see examples and the documentation for a further overview).