Advanced Field Rules | Zoho Forms - User Guide

Advanced Field Rules

Overview

With Advanced Field Rules, you can configure rules with a combination of AND/OR connectors between multiple condition groups to show or hide fields based on the input of respondents.

Let's look at Advanced Rules with some simple examples.

Order Form

If you have an Order Form where you wish to provide discounts based on certain conditions such as:
If the ( Date of Order is between 20 July 2022 and 30 July 2022  AND Number of items  is  greater than  4 ) OR Coupon Code is SALE20), THEN the Discount Applied field is displayed. 

Order Form Example

Job Application Form

If you have a Job Application Form, and you wish to take in the resumes of only candidates with prior work experience:
If ( Year of graduation  is Not Empty)  AND ( Currently Employed  is  Yes  OR Prior Work Experience  is Greater than 0), THEN display the Upload Resume 
field.

Job Application Form Example

Covid 19 Screening Form

If you have a Covid Screening Form where you wish to collect relevant patient details based on the health conditions selected such as:

Covid Screening Form



Configuring Advanced Field Rules

To configure a combination of rules with AND/OR connectors together,
  1. In your form builder, navigate to Rules Field Rules.
  2. Click Configure Now  to configure a new rule.
  3. By default, the rule configuration in the New Rule  pop-up will be in the Basic Field Rule format. To switch to Advanced Rules, click the Switch to Advanced Rules option in the top-right corner (You will find this option in the New Rule  pop-up if this is your first Field Rule after clicking Configure Now ).

    Switch to Advanced Rules

    When you switch to Advanced Rules, all of the Field Rules that you will configure for your form will be in Advanced Rule format.  Learn more about switching from basic to advanced rules.
  4. In the If section, define your conditions by choosing your form fields and the criterion they must satisfy. To add more than one condition, click theicon. You can use the AND/ OR connectors to connect your conditions together. You can switch between the connector as required by clicking them.
  5. Click +Add Sub-group / +Add group to define more conditions with ANDOR  connectors to suit your logic.
    For example: If Coupon Code is SALE20  OR  (Date of Order   is between 20 July 2022  and 30 July 2022  AND Number of items is greater than  4 ):

    Defining Conditions
  6. You can see a summary of the logic you used to build the criteria under Rule Expression.

    Rule Expression

  7. In the  Then section, choose to  Show/Hide  fields or Grouped Choices in your form when your conditions are satisfied. Click the icon to define more than one action.

    Define the Actions in the Then section
  8. Once you have configured the rule(s), click Add to save and view the rule summary.

    Rule Summary

  9. To add more rules, click  in the top right corner. 
  10. You can enable or disable the rule using the toggle on the right. This allows you to temporarily pause the rule's logic without having to delete it.
  11. To filter rules, click the filter icon in the top-right corner. 
Note
  1. A condition field should come prior to the Action field in the form builder for the rule to work.
  2. Once you choose a particular action (Show/Hide) for a field, you will have to continue using the same action on that field in any rule elsewhere. For example, if you choose to Hide the Phone  field, you must use the Hide action to use the  Phone  field elsewhere in the Then section.
  3. You can add only up to 5 groups within a group.

    Grouping Rules

  4. You can add only up to 20 conditions within a group in a rule.
  5. Subform fields cannot be used to configure the conditions/actions of the Field Rules.
  6. Advanced Rules are available only in our paid plans.

When a Formula field is used in Advanced Rules

If a Formula  field is used in the rules, the field(s) involved in the formula must be placed prior to the Formula field in the form.
For example, if you are calculating the Total Cost of a product after applying discount: 

Formula field

Here, the fields involved in the formula of Total Cost are Cost and Discount Applied. These 2 fields must be placed prior to the Total Cost field in the form as shown.

Position of fields involved in Formula field


Info Rules are case-sensitive which means the conditions trigger actions only when the case of the text in the defined condition matches the case of the respondent input. Check out an example to understand this better.