immutabl
immutabl

Reputation: 6903

Is it possible to style a HTML text input field as a password field?

I've got a form with a textbox on it. I have had to apply an input mask on the field as per client's requirements. Client now wants to obscure the input in the manner of a password input field. I've tried setting it as password input but the mask stops working, Is this possible or should I give up now?

Upvotes: 0

Views: 1296

Answers (1)

Phil Gibbins
Phil Gibbins

Reputation: 502

I found this: https://css-tricks.com/snippets/css/password-input-bullet-alternatives/

Which leads to this example: http://jsfiddle.net/estelle/8WpNg/ using the -webkit-text-security property

Seems to work in Chrome, but not Firefox. Searching a bit further I found this article that seems to discuss a JavaScript solution to making this degrade gracefully across browsers that do not support this feature with CSS: Degrading -webkit-text-security

Upvotes: 4

Related Questions