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
Actually, when working with repeaters and populating fields, I have not used the ACF api. I have not had to do work like this in some time and I have not figured out how to use it with with looping through or finding repeaters that have just been added.
The last time I did this what I needed to do what to delete all of the repeater fields, then I would add as many as I needed and then I would populate them all at one time.
This is only a guess, but I would say, create a loop that inserts on new row at a time. This insertion should trigger your append action and then the loop would add another field. I don’t know if that will work in practice.
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.