How to change "Reset Password" text on submit button

admin2025-06-03  5

I want to change "Reset password" text on submit button to "Set password"

How can I change it?

I tried to change value with jQuery:

    add_action( 'resetpass_form', 'resettext');
    function resettext(){ ?>

    <script type="text/javascript">                 
            jQuery('#resetpassform input#wp-submit').val("Set Password");
    </script>
    <?php
    }

But it didn't work, I don't know why

I want to change "Reset password" text on submit button to "Set password"

How can I change it?

I tried to change value with jQuery:

    add_action( 'resetpass_form', 'resettext');
    function resettext(){ ?>

    <script type="text/javascript">                 
            jQuery('#resetpassform input#wp-submit').val("Set Password");
    </script>
    <?php
    }

But it didn't work, I don't know why

Share Improve this question edited Feb 17, 2016 at 8:42 danibeiss asked Feb 17, 2016 at 7:36 danibeissdanibeiss 214 bronze badges 1
  • Hi danibeiss, could you provide more details on what you've tried already (and why it didn't work)? – kraftner Commented Feb 17, 2016 at 8:08
Add a comment  | 

1 Answer 1

Reset to default 2

I've added

jQuery( document ).ready(function() {

and it works! Final working code below:

add_action( 'resetpass_form', 'resettext');
function resettext(){ ?>

<script type="text/javascript">
   jQuery( document ).ready(function() {                 
     jQuery('#resetpassform input#wp-submit').val("Set Password");
   });
</script>
<?php
}
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748929928a314909.html

最新回复(0)