Is there a way to do this?
I would like to add a button on which a user can click to display the password that is hidden ***** by default.
Thank you.
Is there a way to do this?
I would like to add a button on which a user can click to display the password that is hidden ***** by default.
Thank you.
This is a working example for login.php
Put the following jQuery-Code in Clients-Scripts -> Other -> Login Page -> Startup Script
$(document).ready(function() {
$( ' <a id="toggle" class="btn btn-xs btn-info" href="#">Toggle</a>' ).insertAfter( "#password" );
$("#toggle").click(function() {
if ($("#password").attr("type") == "password") {
$("#password").attr("type", "text");
} else {
$("#password").attr("type", "password");
}
});
});
This is a nicer approach... (if you add it to the global startup event then it will work for any page with the password field):
$('<i id="pwstd" href="#" style="margin-left: 5px;" class="glyphicon glyphicon-eye-open"></i>').insertAfter('#password');
$('#pwstd').hover(function() {
$('#password').attr('type', 'text');
}, function() {
$('#password').attr('type', 'password');
});