Mask Passwords from View with the Password Field!

Nadia A. By Nadia A. | January 19, 2017

Last November, we revamped the Textbox field to include advanced text input validation; making it possible for you to easily validate various types of user input (like Zip Codes, Social Security Numbers, MAC Addresses, and even custom strings). This month, we’ve added another unique feature to the Textbox field: the ability to mask inputted passwords from view!

The Password field type in the Textbox field settings.

To securely collect passwords through your Cognito Forms, start by opening up your form settings and make sure that you have data encryption enabled. Our data encryption feature (available to organizations on our Team and Enterprise plans) adds an extra layer of security to your entry data, and also prevents it from being transmitted out of your Cognito Forms account.

Lastly, add a Textbox field to your form, and select Password as the field type. And that’s it! Now, when a user types in their password, the characters are masked from view:

The Password field masks inputted characters from view with asterisks.

Password validation

With the help of the custom error option, you can also ask users to confirm their password and validate that the two passwords match. To do this:

  1. Add a second password field to your form labelled “Confirm Password” (or something similar).

  2. From the field settings of your second password field, select Custom Error Option - When. In this case, we want an error message to appear when the second password is not the same (or not equal to) the first password:

An expression that determines if the first password field matches the second.

  1. Make sure to write your custom error message:

Write a custom message in the Show Custom Error option.

Now, when a user types in an email that doesn’t match the original Email field, a message will appear to let them know:

A custom error message that informs users that their emails do not match.

Have any questions about collecting passwords, or Cognito Forms in general? Feel free to contact us and let us know!


Nadia A.

Nadia A.

Nadia, the Technical Writer for Cognito Forms, develops documentation, support content, and how-to videos. No matter your experience – with her help, you'll be able to take full advantage of the product. In her spare time, Nadia enjoys listening to French house, drinking coffee, and talking about herself in third person.