Home › Forums › Backend Issues (wp-admin) › Select in repeater – Prevent user from selecting the same option twice › Reply To: Select in repeater – Prevent user from selecting the same option twice
Hi @sirjonathan
I would use a simple jQuery approach to loop through all the select fields, and then apply a disabled attribute to it’s options where the option value has already been selected.
You can use the acf/setup_fields JS hook to fire your code:
http://www.advancedcustomfields.com/resources/tutorials/adding-custom-javascript-jquery-for-fields/
Thanks
E
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.