Yea i had to do the same thing, check here http://github.com/alloy/complex-form-examples
On Thu, Oct 7, 2010 at 8:53 AM, jhaagmans <[email protected]> wrote: > Hi, > > I'm using a nested form to create an object. It looks something like > this: > > form_for @object do |f| > f.label :name > f.text_field :name > fields_for :child_object do |child_form| > render :partial => 'child_form_part', :locals => { :form => > child_form } > end > # here a link to create a new child object > end > > Now, as you can see, I want to use an AJAX link to add a new child > object to the form and show its partial in addition to the children > that are already there. However, I don't know how to do that. I can > use RJS to add the partial to the form using insert_html, but I'm not > sure how to pass along the local form object so I can build the form > in the partial. > > Is there a good way to do this? > > Thank you. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

