Home › Forums › Backend Issues (wp-admin) › Repeater to manage a custom post type › Reply To: Repeater to manage a custom post type
Thank you for the pointers. I will take a close look at the function on github.
At the moment I have added another field to the field group. This field is assigned a default value and is set to read-only.
When saving duplicated rows, the default value of the field is passed on and I can check this in the loop. It’s not a very nice solution but it seems to work.
Before that I used your function add_filter('acf/validate_value/name='.$field_name,...
to declare a field as unique. So there will always be one field unique that can be checked in the loop.
Maybe there is a more elegant solution?
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.