Dynamic forms

17 views
Skip to first unread message

Linus Pettersson

unread,
Apr 4, 2012, 2:50:05 PM4/4/12
to rubyonra...@googlegroups.com
Hi!

I have a nested form with Applications and Participants. One application can have many participants. Now I want to be able to dynamically (using JS) add fields for the Participants in the Applications form.
I'm a bit lost on how to do it though... I did watch some videos on RailsCasts (#196, #197) but they seem rather outdated.

I guess I should be able to create some kind of JS-partial that renders only the Participant part of the form and inject it using javascript, the problem would then be, how do I get the form object to the JS... Not possible, right?

So, anyone can give me some tips with this?

Regards
Reply all
Reply to author
Forward
0 new messages