Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Show password on Login pages
#1
If you want to let users show/hide the password instead of the dots in the password field, you can do it like this:

<input id="password" name="password" type="password" value="" confirm="" required="true">

<input id="showpassword" type="checkbox" onclick="showPW()">

<label for="showpassword">Show password</label>

<script>
function showPW() {
var x = document.getElementById("password");
if (x.type === "password") {
x.type = "text";
} else {
x.type = "password";
}
}
</script>

This works by displaying the login info that the user has stored in their browser, it can't pull info from the database.
Reply


Messages In This Thread
Show password on Login pages - by Mags - 08-29-2024, 03:31 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)