How to create a nested form in backbone relational?
Posted
by
jebek
on Stack Overflow
See other posts from Stack Overflow
or by jebek
Published on 2012-11-09T09:40:43Z
Indexed on
2012/11/17
5:01 UTC
Read the original article
Hit count: 176
I would like to be able to create nested models at the same time in backbone. I know how to use backbone relational to create the parent model. Then once it is saved, I can create child models through backbone relational. However, I want to be able to create both the parent and child models at the same time, which might not be possible because I can only create the child model once the parent model has already been created.
For example, let's say I was creating a forum like the one from the awesome backbone relational tutorial - http://antoviaque.org/docs/tutorials/backbone-relational-tutorial/. I would want to create a thread and a message at the same time(through the click of a single button) rather than create a thread then a message. Is this possible? Is there a better way of doing this that I'm not thinking of?
© Stack Overflow or respective owner