The attached patch adds an option to the textfield component so a "Password" option can be chosen. The input will be rendered then as a password.

I don't know if this is the best way of adding a password field. I've seen another approaches but not for D7, and I found this one more elegant, since no code is duplicated and the patch is relatively small.

CommentFileSizeAuthor
password_field_webforms_d7.patch2.56 KBjorge.suarez

Comments

jorge.suarez’s picture

This patch has a problem. All controls (even the not textfields) have now the "Password" options. Not choosing the "Password" option for any not-textfield control is a good workaround for now. Any advice on how to solve this? Thank you.

quicksketch’s picture

Status: Active » Closed (won't fix)