Tutorial 08 · Basic logic
Cross-field validation
Compare two answers and show a useful error when they disagree. This example confirms an email address.
1. Prepare the survey
Open a practice survey from Home and click Edit. Add these pages and questions in the order shown. Click a question type in the builder palette, then select the question to edit its label and choices. Use Add Page for later pages.
| Page | Question | Type and setup |
|---|---|---|
| Confirm your email | Email · Optional initially | |
| Confirm your email | Confirm email | Email · Optional initially |
2. Configure the logic
Choose validation
Choose Validate an answer. In When, select Email and set Condition to is not empty. Click Next.
Choose what to validate
Set Action to Validate answer, select Confirm email, and enter Enter the same email address in both fields. in Message.
Compare the answers
Inside the validation condition, select Confirm email, set Condition to equals, and set Compare with to Another answer. In Answer, select Email. This check must pass when the outer condition matches.
Review the two layers
Click Next. The outer rule decides when validation runs; the action checks that the confirmation equals the original. Give the rule a clear name such as Emails must match.
3. Review the logic flow
Read the final flow before saving. For conditional rules, YES means the condition matches and NO means it does not. An unanswered source can leave the rule waiting. Use Try answers when it is available, or Back to adjust the setup. View full survey flow provides the surrounding page order and saved rules.
4. Save and publish
Save the reviewed logic
On the final wizard step, click Save logic. Your changes join the survey draft. If the tutorial creates more than one rule or setting, complete and save every part before publishing.
Confirm the draft is saved
Close Logic. Wait for the builder’s save/sync status to complete. You can reopen Logic to check the saved rule or setting. Save logic does not by itself update the public survey.
Publish the survey
Click Publish in the builder, then Publish Now in the confirmation. Use the public link to test the published survey. After later edits, publish again before checking the live result.
Test in a fresh respondent tab
Start with a fresh public survey tab. If you already had an older published version open, reload and start a new response. Use a practice survey for test submissions.
5. Test the respondent experience
Run both the matching and alternative cases. Change answers and revisit earlier pages where the test asks you to, rather than testing only one path.
| Try this | Expected result |
|---|---|
| Different addresses | Submit is blocked with the custom error next to the confirmation field. |
| Matching valid addresses | Validation passes. |
| Email is unanswered | The conditional comparison waits. If both fields must always be answered, also mark them required. |
Common mistakes and useful limits
- Do not type a question name into a fixed value. Choose Another answer and select the actual source question.
- Use two Email questions; a text box does not provide the same email-format check.