• Resolved Rajon Ahmed

    (@engrrajonahmed)


    I want to disable autofocus for all the fields.
    Specially for #user_login, #user_pass, #pass1, and #pass2.

    You provided a snippet of code but it works only with the user_login field on the sign in page.

    What to do?

    // Begin Disable TML Login Form Username Autofocus //
    add_action( 'wp_enqueue_scripts', function () {
        if ( tml_is_action( 'login' ) ) {
            wp_dequeue_script( 'theme-my-login' );
        }
    }, 11 );
    // End Disable TML Login Form Username Autofocus //
Viewing 1 replies (of 1 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    Try just:

    add_action( 'wp_enqueue_scripts', function () {
        wp_dequeue_script( 'theme-my-login' );
    }, 11 );
Viewing 1 replies (of 1 total)
  • The topic ‘Disable autofocus for fields’ is closed to new replies.