Home › Forums › ACF PRO › How to execute a function on change event in select2? › Reply To: How to execute a function on change event in select2?
@James – THANK YOU! I wrestled with this issue for hours, until I finally found your post.
I used to have an ACF select2 event that worked prior to ACF 5.4+:
$("#acf-field_1234567890").on("change", function() { }
In your answer you mentioned that the selector is actually #acf-field_1234567890-input
. That solved it for me. I guess at some point ACF changed the select2 wrapper or version? At any rate, thank you! Your code above solved it for me.
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.