Skip to content

Conversation

@Merwer
Copy link

@Merwer Merwer commented Dec 18, 2016

Added support for providing options when serializing forms. Options are used to ensure that default functionality continues as is.

Current options include an option to define how various <input> types are encoded. There was already functionality to convert checkboxes into booleans, but now that feature can be turned on/off. In addition, a new encoding option is added to support converting <input type="number"> into an integer.

var serializeOptions = { 'encodes': { 'checkbox': true, 'number': true } };
var $form = $(document.querySelector('form'));
var obj = $form.serializeObject(serializeOptions);

@gubi
Copy link

gubi commented Feb 5, 2018

Please merge this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants