Home › Forums › General Issues › acf not defined – JavaScript API › Reply To: acf not defined – JavaScript API
John, thanks for your reply. Does that mean I should create a separat JS file in order to use the acf js api and shouldn’t use my main.js file with the hook add_action( 'wp_enqueue_scripts', 'my_scripts' );
?
And can you explain what you mean by making the script dependant on ‘acf-input’? I don’t quite understand.
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.