Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a programmatic interface to manipulate nested fields #3

Open
gael-ian opened this issue Dec 14, 2022 · 0 comments
Open

Add a programmatic interface to manipulate nested fields #3

gael-ian opened this issue Dec 14, 2022 · 0 comments

Comments

@gael-ian
Copy link
Member

Currently the only way to add an item to a nested form is to trigger the click event on the add link.

Cocooned introduces referencing its own instance as a (jQuery) data attribute on the items container. Hence, it is theoretically possible to get that instance and call its add method to add a new item to the form. But the add method expect the add link and an event as arguments.

Cocooned should expose a clean interface to manipulate items in a nested form.


Originaly suggested in nathanvda/cocoon#431

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

No branches or pull requests

1 participant