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
Hey,
I’m not looking for help 🙂 I’ve found a solution already (not a clean solution, but at least it works). It was easy. I just wanted to share the knowledge. For many people, it might not be so straightforward because there’s no documentation for ACF JS objects.
Here’s the another example where I make use of the acf.fields
object.
But thanks for the links anyway. Sometimes creating a new field type that extends the built-in field might be a better idea than trying to “hack” the existing fields.
PS
I would appreciate if @eliot commented on this topic. The only thing I wasn’t able to find out is how to get all the instances of the field of a given type.
As I said in the previous comment: an acf.fields.{FIELD_TYPE}
object contains only a one field of the given type. How to get the other fields?
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.