In this guide, we will explain how to compare if two fields have the same value. We will compare two Email fields.
Example 1:
In this example, we will use the “Field Update Workflow” field to set the “Rule Criteria” and show the message.
Drag and drop two Email and a Field Update Workflow field. Rename the Email fields as shown below.
Click the pencil icon of the Field Update Workflow field.
Set “Rule Criteria”
Repeat Email || not equal to || {{Email}}
Set a Rule Criteria Success Message. And save the changes.
Try the form. The second email field will auto-fill with the same ID when the user fills in the first email field.
And if the user edits the second email field, it will show a message.
Example 2:
In this example, we will use “Custom Attributes” to compare the fields and prevent users from navigating to the next page or submitting the form.
Drag and drop two email fields. Rename the fields as shown below.
Click the pencil icon of the first Email field and click “Add Custom Attributes”.
Please add an attribute for the field as shown below.
input || id || email_1
Click the pencil icon of the second Email field and click “Add Custom Attributes”.
Please add an attribute for the field as shown below.
input || data-parsley-equalto || #email_1
Try the form. The second email field will auto-fill with the same ID when the user fills in the first email field.
And if the user edits the second email field and tries to submit the form, the field will show a message.
For any questions, please contact us - [email protected] or the Formyoula in-app chat 🙂