Home › Forums › Backend Issues (wp-admin) › Updating field values using the Javascript API › Reply To: Updating field values using the Javascript API
This is correct. These function do not return the ACF field objects, only the DOM elements.
It uses
$fields = $(selector);
You can test this doing something similar without using the ACF API.
I believe that the only way that you can use acf function on a field is to use the `
acf.getField(FIELD_KEY)
and that if you use the other functions then you need to get the field key from the returned dom elements and use that to get the actual field to use ACF functions to manipulate it.
Although I am not 100% sure on this, I’m simply going by what it is that ACF gets and returns.
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.