Instead of relying on jQuery's serializeArray method, the plugin now re-implements its own method with the exact same functionality, but extending its behavior to include the DOM element in the returned list of objects. This allows the plugin to handle multiple inputs with the same name, which is common when defining arrays. Fixes #67.
Functions provided as custom types (customTypes option) now receive an optional second argument with the DOM element. This allows for more powerful integrations between serializeJSON and other plugins. This implements the proposal on issue #109.
In addition, the extended serializeArray handles unchecked checkboxes with the plugin options, which simplifies the code and allows using unchecked checkboxes for array elements (with the same input name, e.g. "myarray[]").
Instead of relying on jQuery's serializeArray method, the plugin now re-implements its own method with the exact same functionality, but extending its behavior to include the DOM element in the returned list of objects. This allows the plugin to handle multiple inputs with the same name, which is common when defining arrays. Fixes #67.
Functions provided as custom types (
customTypes
option) now receive an optional second argument with the DOM element. This allows for more powerful integrations between serializeJSON and other plugins. This implements the proposal on issue #109.In addition, the extended serializeArray handles unchecked checkboxes with the plugin options, which simplifies the code and allows using unchecked checkboxes for array elements (with the same input name, e.g. "myarray[]").