Let Wufoo do the hard work. Sign up for a free account and start making forms the easy way.
Live Demo
Firefox | Safari | Safari | Chrome | Opera | IE | Android |
|---|---|---|---|---|---|---|
The Low Down
The password input type is used to create an obscured text control.
- Other than
dirnameandlist, thepasswordinput type accepts the same attributes as thetextinput type: you can basically usepasswordfor any input control where you want to obscure the content the user enters. - Attributes supported in theory by the
passwordinput type includeautocomplete,inputmode,maxlength,minlength,pattern,placeholder,readonly,required, andsize.Inputmodeandminlengthare not yet supported in any browser.Autocompleteshould be set to off:autocomplete="off". - When a dynamic keypad is used for data entry, many browsers will temporarily display each character as it is entered for better user experience (it’s easy to typo when a key is so tiny).
- To make any non-GUI input type appear obfuscated in Safari, Opera and Chrome you can include
-webkit-text-securitywith the value ofdisc, circle, square,ornone. This will not alter the appearance of the password input type, however, because of the inclusion of
input[type="password"] { -webkit-text-security: disc !important;}
in the User Agent stylesheet. While you can overwrite CSS in your UA StyleSheet, you can’t overwrite any !important found there. Example
- What obfuscated, the password input type is not actually secure. The value is passed unobfuscated and not encrypted, so always, at minimum, use
method="post"over SSL.