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

When submitting a form as a object with multiple sections error is given if no post information for a section is submitted #90

Closed
timjrobinson opened this issue Jan 12, 2014 · 1 comment · Fixed by #106
Labels

Comments

@timjrobinson
Copy link
Contributor

If you create a form that is an object with multiple other forms inside it like so:

{
'user_details': {
'name': fields.string({})
}
'address': {
'street': fields.string({})
}
}

Then when you create the form if you don't add a section for whatever reason when you submit it gives 'Cannot read property xxx of undefined' because it's iterating through all the form sections and binding the data to each section and when there is no data for that section it dies.

I'll submit a test case and pull request later, just jotting this down here for anyone else encountering a similar issue.

@ljharb
Copy link
Collaborator

ljharb commented Jan 15, 2014

Thanks for filing this! A test case would be great at the least, a pull request even better :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants