There are few occasions where you may want to add complex form conditions to your form fields, and it may lack readability to input so many form validation in a single validation box.

In a short guide, I'll show you how to compute four conditional operators neatly.


Let's say you want to submit a form where a user's first name is Aron or Paul and when the user's last name is Stone or Annabel.


We'll add two form fields, Firstname(fname) and Lastname(lname).

Click on Conditional Validation (We'll use expressions to validate the form input. To learn more about expressions, kindly take a look at this article).

  1. In the Expression field, input the form validation expression. You can use the online Conditional Generator to generate the condition. e.g. fname == "Aron" or fname == "Paul"

  2. In Error Message, you can type the error message you want to display to your users when the condition is not satisfied.

  3. Field ID to attach the error to is optional, but you can assign the position on your form field where you want to show this error.

  4. Now, we'll click on the duplicate icon to merge another condition.

  5. You can choose to hide the submit button if the user's input doesn't match the condition by setting the "Also hide the Submit button if the condition is not satisfied" to Yes.

Finally, we'll configure the last name field condition.

  1. Input the conditional validation in the Expression field. e.g. lname == "Stone" or lname == "Annabel".

  2. In Error Message, type or customize the error message you want to display to your users.

  3. Field ID to attach the error to is optional, but you can assign the position on your form field where you want to show this error.

  4. Activating Also hide the Submit button if the condition is not satisfied to Yes, on the second condition will hide the button except when both form fields conditions are met.

That's it, we're done.🎉🎉

Did this answer your question?