Support

Account

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.