Home › Forums › Backend Issues (wp-admin) › How to get/set repeaters field cloneindex? › Reply To: How to get/set repeaters field cloneindex?
So, I think it happens on line 1811 (starts at duplicate: function( $el, attr ){
) of /assets/js/acf-input.js. It looks for the ‘data-id’ attribute, which in this case should be acfcloneindex
and replaces it with a unique id. The field name replacement is this part
// replace names
$el2.find('[name*="' + find + '"]').each(function(){
$(this).attr('name', $(this).attr('name').replace(find, replace) );
});
is acfcloneindex
being replaced anywhere in your field? all occurrences for that string should be replaced in id attributes, labels, names, etc.
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.