We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey,
I was using your jQuery plugin and have encountered this weird behaviour.
<!DOCTYPE html> <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.serialize-object.js"></script> </head> <body> <form id="new_form"> User Name: <input type="text" name="agent_signup[user_name]"> <br> User Email: <input type="text" name="agent_signup[user_user_emails_attributes[0][email]]"> <br> Agent Role <input type="checkbox" name="agent_signup[role_ids][]" value="1">Account Administrator <input type="checkbox" name="agent_signup[role_ids][]" value="2">Administrator <input type="checkbox" name="agent_signup[role_ids][]" value="4">Agent <input type="checkbox" name="agent_signup[role_ids][]" value="3">Supervisor <button>Submit</button> </form> </body> </html>
To serialize the form, I ran
$("#new_form").serializeObject()
The returned object was
"{"agent_signup":{"user_name":"tushar","user_user_emails_attributes[0":{"email]":"[email protected]"},"role_ids":["1","4"]}}"
whereas the expected object is
"{"agent_signup":{"user_name":"tushar","user_user_emails_attributes":{"0":{"email":"[email protected]"}},"role_ids":["1","4"]}}"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey,
I was using your jQuery plugin and have encountered this weird behaviour.
To serialize the form, I ran
The returned object was
whereas the expected object is
The text was updated successfully, but these errors were encountered: