I would like to verify that the email confirmation field has the same value as the email field on my form. I want to show an error massage when it does not match. How can I do that on the form?
1 Answer
In Cognito Forms, you can use the Show Custom Error option to show error messages for any reason.
In this case, you can show an error message when your two email address fields do not have the same value. Here are the steps to do this:
- Add an
Email
field called "Email" - Add a second
Email
field called "Confirmation Email" - For this confirmation field, select Show Custom Error - When
- Switch to the Advanced Editor and enter this calculation:
=(ConfirmationEmail != Email)
- Click Save to close the conditional logic dialog
- Enter the error message you wish to show when this error occurs
Here is what this will look like when you are entering the validation calculation: