Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

double nested form #287

Open
abacha opened this issue Sep 5, 2013 · 5 comments
Open

double nested form #287

abacha opened this issue Sep 5, 2013 · 5 comments

Comments

@abacha
Copy link

abacha commented Sep 5, 2013

I'm trying to create two nested forms for the same relation but with different forms
but when I click on the 'add' button on the form A, it creates a line like line B

@richardrails
Copy link

have you fixed that?

@Startouf
Copy link

Startouf commented Nov 9, 2014

Might be related to this one ? #288

@camilosad
Copy link

any sugestion?

@Startouf
Copy link

Try to specify data target :

<%= f.link_to_add 'add new', :your_association, :data => { :target => "#your_association-#{f.index}"}

And don't forget to wrap your fields inside a tag with the .fields class

(You might want to have a look at #343)

@camilosad
Copy link

Thanks friend!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants