The action you’re using,
'acf/input/admin_footer' only fires on the admin page where you edit the field groups. (Perhaps this is not what you want)
To enqueue a script that fires on every admin page and loads after ACF, use this:
wp_register_script('custom-acf-js', get_template_directory_uri() . '/library/scripts/script-js.js', ['acf-input'], '1.0.0', true); wp_enqueue_script('custom-acf-js');
The five parameters in the
wp_register_script(UNIQUE_NAME, FULL_URL_OR_PATH, DEPENDENCIES_ARRAY, VERSION, LOAD_IN_FOOTER_BOOLEAN); wp_enqueue_script('custom-acf-js')
['acf-input'] in the dependencies array parameter tells the script it needs to wait until ‘acf-input’ has loaded first, which is ACF’s js script.
If you want the script to load in other ways, on other pages, ACF also has other actions you can hook into, take a look here for those: https://www.advancedcustomfields.com/resources/#actions
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!