Hi, I'm trying to create a multi-level ajax form on my rails app that can add/remove fields associated with a new object in a form when a button is clicked. However, I need to have multiple levels to this form (i.e. if someone adds a "Meal" object, there must also be a button inside the created "Meal" form for "Add a food".)
I followed this tutorial (parts 1-3) by Ryan Bates (http://railscasts.com/episodes/73-complex-forms-part-1), but it only describes a single level form. The prototype helper commands for rails do not allow me to put javascript inside javascript however (there is an issue with escaping the characters properly). How else can I create a form like this? Thanks.