I have a many to one relationship I'm trying to model with Backbone-Forms that I can't get to work.
The idea is that there are many foos that are attached to a single bar. The catch is every bar must have at least one foo. I want to be able to have a single form where you can create a bar, and as many foos as you want that are attached to that bar. The Backbone-Forms list would be perfect, unfortunately I don't know how to implement it with a nested model.
Thanks.
I have never used Backbone-Forms before. But If I wanted to implement this without using this plugin I would go about this way.
I would have 2 Models and 2 Collection.
Models
Collections
I would have a parse method in Bar model that creates a Foo collection for each Model.
Views
Something in these lines.. This is just a rough example
Check Fiddle