the only real difference between the JS for the repeater and the JS for the non-repeater fields is that on the repeater field I added
var $row = e.$el.closest('.acf-row');
and then each place where I need to get or set a value for a field
$row.find() is used instead of
Other than this the JS code from one to the other is pretty much identical and I’ve already built in the ability to use the “title” field on the repeater because I have a good feeling that the client will want this added once the see the draft of the site I’m building for them.
Hope it helps, there’s a bunch of extra code in there due to dealing with both a repeater and an non-repeater, but the code was just completed and tested today.
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!
© 2022 Advanced Custom Fields.