• Good Day!

    We are trying to change Wordfence’s 2FA overlay form “Log In” button text on click to “Processing…”

    Details: https://ibb.co/t3ZpMnJ

    We have tried both the PHP and JS code snippets provided below, but none work.

    We have also submitted a ticket to Wordfence Support for assistance, but it’s under review and a solution may not be available within 2-3 months.

    So, hoping an experienced coder out there can help us. We prefer a PHP Code Snippet ??

    Thank you!

    ———————————

    Button HTML Code:

    https://ibb.co/Htkgptj

    PHP Code Snippet (Option 1):

    add_action( 'login_enqueue_scripts', 'login_enqueue_wordfence_js' );
    function login_enqueue_wordfence_js() {
    	wp_register_script( 'button-handle-wf', '', array("jquery"), '', true );
    	wp_enqueue_script( 'button-handle-wf' );
    	wp_add_inline_script( 'button-handle-wf', '(function($){$("#loginform input#wfls-token-submit").on("click", function() {$(this).val("Processing...");});})(jQuery);');
    }

    JS Code Snippet (Option 2):

    <input onclick="changeText()" type="submit" value="Log In" id="wfls-token-submit">
    function changeText(){
     let element = document.getElementById("wfls-token-submit");
     if (element.value=="Log In") 
     	element.value = "Processing...";
     else 
     	element.value = "Log In";
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • We’ve discussed this in a Premium support ticket. Posting here so others know. There is an internal case to change the behavior of the login button to show that the click was registered. It is slated for an upcoming release and will likely be released in the Wordfence Login Security plugin first and then released in the main plugin a few weeks afterwards.

    Tim

    Thread Starter generosus

    (@generosus)

    Hi @wfsupport,

    As always, thank you for your awesome support.

    Can you share why the changes will be reflected first in your plugin, Wordfence Login Security, and not the main plugin? Perhaps to gather real-time data or feedback from your lesser used plugin?

    Once the plugin update is released, I’ll closed this topic as “Resolved.”

    Again, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change 2FA Log In Button Text On Click’ is closed to new replies.