Show password on Login pages - Printable Version +- WA Forums (https://webassist-pro.com/WAforum) +-- Forum: Introduction (https://webassist-pro.com/WAforum/forumdisplay.php?fid=1) +--- Forum: General coding information (https://webassist-pro.com/WAforum/forumdisplay.php?fid=4) +--- Thread: Show password on Login pages (/showthread.php?tid=12) |
Show password on Login pages - Mags - 08-29-2024 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. |