Support

Account

Home Forums Backend Issues (wp-admin) Fill fields after change value in another field Reply To: Fill fields after change value in another field

  • You did not use the right hook to enqueue your script in the admin part.
    The best way to do this when you are using ACF is to use the dedicated action.

    Heres an example to enqueue a my.js file from <MY PLUGIN>/js

    add_action( 'acf/input/admin_enqueue_scripts', function () {
    	wp_register_script( 'my-js', esc_url( plugins_url( '/js/my.js', __FILE__ ) ), false, false, true );
    	wp_enqueue_script( 'my-js' );
    
    } );