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
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.
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.
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!
© 2022 Advanced Custom Fields.