Matching two fields for confirmation

Hi,

I am collecting contact numbers in a form (mobile numbers), and asking the user to enter them twice, in 2 cascading text fields. How do I run the exact matching of the entered number, which should throw an error (and does not proceed ahead) if the numbers in the both fields do not match!

Thanks,
Saad

A constraint on the second field to check it being equal to the first should do what you need. You'll probably want to add a regex related to your phone number parameters (example discussed in Set Limit On Integer). Also, be sure to include a helpful constraint_message.

number_match.xlsx (8.7 KB)

+------+---------+----------------+--------------+------------+
| type |  name   |     label      |  constraint  | appearance |
+------+---------+----------------+--------------+------------+
| text | number1 | First number:  |              | numbers    |
| text | number2 | Second number: | .=${number1} | numbers    |
+------+---------+----------------+--------------+------------+

Screen Shot 2021-08-16 at 7.30.18 PM Screen Shot 2021-08-16 at 7.30.23 PM

1 Like