Home › Forums › Front-end Issues › Adding a sub field to a repeater with JavaScript › Reply To: Adding a sub field to a repeater with JavaScript
You need to make sure you’re targeting only one link. Every row of a repeater has an element that will match your selector. You code will trigger a click on every matching element. You’ll notice that the selector I posted above includes .acf-actions
to target only the add element inside of that element.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.