Is there a way to compare two inputs in Survey123? For example they would input their email and then would input it again to confirm and the survey would only allow it if they were identical?
Solved! Go to Solution.
Hi Katie
You could achieve this in Survey123 Connect using a constraint. In the example below, the constraint .=${email1} is used to verify that the email_check question matches the value in the email1 question. When the survey response is submitted, an error will be shown if the values don't match.
As an aside, you can also use a regular expression to check that the input is properly formatted as an email address. For more on constraints and regular expressions, see Formulas—ArcGIS Survey123 | Documentation (includes the regular expression for validating the email address format).
Best,
Jim
Hi Katie
You could achieve this in Survey123 Connect using a constraint. In the example below, the constraint .=${email1} is used to verify that the email_check question matches the value in the email1 question. When the survey response is submitted, an error will be shown if the values don't match.
As an aside, you can also use a regular expression to check that the input is properly formatted as an email address. For more on constraints and regular expressions, see Formulas—ArcGIS Survey123 | Documentation (includes the regular expression for validating the email address format).
Best,
Jim
Thanks Jim! This worked great!
This worked great! Is there a way to make it not case sensitive though? This works but it has to be an exact match including case sensitivity.