Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for number parsing #98

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

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