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.