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
1 Answer
Reset to default 2I'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
}