Support

Account

Home Forums Feature Requests JS hooks – a reference to DOM node of the rendered item in the callback function Reply To: JS hooks – a reference to DOM node of the rendered item in the callback function

  • @hube2

    A little update. I’ve just found that ACF exposes a global acf JS object. So instead of DOM traversing we’re able to use its fields and methods to get the fields data.

    For example: acf.fields.google_map is an object containing a google_map field type data, a reference to the DOM element, fields settings, etc.

    But it returns only one field of a given type (the last one). I didn’t find yet how to get the data of a specific field of a given type. I’ll try to figure it out and I’ll update this post.