That’s the one. Okay, so I assume I’d be replacing:
$(element).find('.acf-input input').attr('readonly', true);
with something like:
$(element).find('div[data-name="FIELD_NAME_HERE"] input').attr('readonly', true);
Correct?
Well that’s better than what I had originally, so thank you. Shame there’s no unique ID field available to repeaters!
EDIT: Sorry, wrong post!
That’s the one. Okay, so I assume I’d be replacing:
$(element).find('.acf-input input').attr('readonly', true);
with something like:
$(element).find('div[data-name="FIELD_NAME_HERE"] input').attr('readonly', true);
Correct?
Well that’s better than what I had originally, so thank you. Shame there’s no unique ID field available to repeaters!
HI John, that link you posted about disabling element of repeaters only goes to a page of replies you’ve posted on the forums.
That does sound like a possible solution though. The only issue that could arise here is if a previously-used value is used again. It’s an unlikely event, but possible. I don’t suppose new fields in repeaters get assigned an ID value in the database that can be accessed somehow?
John, you clever son-of-a-female-dog, you’ve got it! Thank you so much!
Didn’t work, but good to know in general!
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.