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

2 participants

@timjrobinson

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
Collaborator

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

@ljharb ljharb closed this in #106 Mar 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment