Home › Forums › Backend Issues (wp-admin) › Get the saved value from a dynamically loaded Select field using JavaScript API › Reply To: Get the saved value from a dynamically loaded Select field using JavaScript API
To get the value of the field
1) Return the current value for the post being shown as part of the AJAX response you are already doing.
2) Use wp_localize_script() to set the current value in a JS var so that you can access it.
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.