I am looking to use Django to create a form with a password field that can be toggled to be hidden or shown. This functionality can be seen on MailChimp at https://login.mailchimp.com/signup. Does anyone know how such a field could be created?
it's just purely javascript :
<script type="text/javascript">
function reveal()
{
if(document.getElementById('box').checked)
{document.getElementById("pw").type='text';}
else
document.getElementById("pw").type='password';
}
</script>
<input type="checkbox" id="box" onclick ="reveal()">
<input type="password" id="pw">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With