Home › Forums › Backend Issues (wp-admin) › ACF Javascript API – Dynamically Update select2 Field Options › Reply To: ACF Javascript API – Dynamically Update select2 Field Options
I don’t think you can do that directly with the ACF API. You need to target the .select2() object of the field…. and I don’t know how to do that.
I found this which indicates that this is not technically possible in Select2 itself but there appears to be several work-a-rounds https://github.com/select2/select2/issues/2830
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.