The conditional formula set up in Zoho Forms allows you to configure your form to perform certain calculations based on your respondents' answers. These predefined conditions are simple to set up and they will tailor your form to your user's needs. With Conditional Formula you can perform data-driven calculations, and provide customized auto-filled payments, which means the form will provide customers with a unique payment amount with the calculated mathematical output, saving you the burden of calculating for each case.
Overview
A condition refers to a setup which will include the following 3 things:
- The field(s) to be checked.
-
The condition to be satisfied (is, is not, is empty, etc).
-
The mathematical calculation to be performed.
This is similar to the
If and
Else conditions that you use in Excel. When the condition is found to be true, it executes a certain mathematical calculation and when found to be false, it moves on to the next condition.
You can even set
multiple conditions, where the fields can be checked for multiple answers to perform a distinct calculations.
To understand this better, here are a few scenarios:
-
Waive off a 50% discount on the total purchases on more than five shirts.
-
Calculate taxes based on the annual income range.
-
Offer a discount of 20$ upon the coupon code of DISCOUNT20SPRING.
-
Offer a bulk discount of 100$ if the total purchase amount is above a threshold value.
Check out
how to configure a few of these examples.
Setup
To set up conditional formula,
-
Add a
Formula
field to your form from the
Advanced Fields.
-
In the pop-up, click
.
-
In the Conditional Formula pop-up, set up the necessary logic.
-
Choose All or Any, from the dropdown.
-
To add more conditions, click theicon.
-
Under Perform when none of the conditions is met, set up the formula that will be performed when none of the conditions is found to be true. This is also referred to as a
default expression.
-
To delete a condition, click theicon.
Adding multiple conditions
You can add more than one condition to perform calculations. This will be useful when you want to check the field for multiple answers and perform distinct mathematical calculations based on it. For example, in a scenario where you are expecting numerous coupon codes to waive off appropriate discounts during your spring sale, you can process the coupon codes in simpler steps. The payment will differ for each customer based on the type of coupon they own.
Examples
Scenario 1:
Processing the coupon code DISCOUNT20 to waive off 20% on the total price of the purchase.
Scenario 2:
Waiving off 100$ on the total price of the shirts upon the orders of 5 or more.
Scenario 3:
Deciding the tax based on the annual income range of the employee.
Supported Operators
Text and field comparison
- Is: Checks if the selected field is equal to the set value
- Is Not: Checks if the selected field is not equal to the set value
- Is Empty: Checks if the selected field is empty
- Is Not Empty: Checks if the selected field is not empty
- Contains: Checks if the selected field contains a value in the condition
- Not Contains: Checks if the selected field does not contain a value in the condition
- Contains Any Of: Checks if a field contains any of the selected choices
- Contains All Of: Checks if a field contains all of the selected choices
- Contains None Of: Checks if a field contains none of the selected choices
- Starts With: Checks if the selected field starts with the given value
- Ends With: Checks if the selected field ends with the given value
Choice and selection
- Other Choice Is Not Empty: Checks if a value is entered in the Other choice
- Is Any Of: Checks if any of the choices chosen in the condition match
Is None Of: Checks if none of the choices chosen in the condition match
Less Than: Checks if a number is less than a given value
Greater Than: Checks if a number is greater than a given value
Less Than or Equal To: Checks if a number is less than or equal to a given value
Greater Than or Equal To: Checks if a number is greater than or equal to a given value
Between: Checks if a number/date is between 2 given values
Not Between: Checks if a number/date is not between 2 given values
Date and Time Comparison
Day of the week
Day Is: Checks if a date falls on the selected day of the week
Day Is Not: Checks if a date does not fall on the selected day of the week
Is Any of Selected Days: Checks if a date falls on any of the selected days of the week
Is None of Selected Days: Checks if a date does not fall on any of the selected days of the week
Is Previous Day: Checks if a date falls on the previous day
Is Current Day: Checks if a date falls on the current day
Is Next Day: Checks if a date falls on the next day
Is Before [x] Day(s): Checks if a date falls 'x' number of days before the current date
Is After [x] Day(s): Checks if a date falls 'x' number of days after the current date
Is Previous Week: Checks if a date falls in the previous week
Is Current Week: Checks if a date falls in the current week
Is Next Week: Checks if a date falls in the coming week
Is Previous Month: Checks if a date falls in the last month
Is Current Month: Checks if a date falls in the current month
Is Next Month: Checks if a date falls in the next month
Month Is: Checks if a date falls in selected month of the year
Is Any of Selected Months: Checks if date falls in any of the selected months of the year
Is None of Selected Months: Checks if date does not fall in any of the selected months of the year
Is Previous Year: Checks if a date falls in the last year
Is Current Year: Checks if a date falls in the current year
Is Next Year: Checks if a date falls in the coming year
Year Is: Checks if a date falls in selected year
Is in the Past: Checks if a date falls in the past
Is in the Future: Checks if a date falls in future
Time
Time Is Before: Checks if the time falls before the specified time.
Time Is After: Checks if the time occurs after the specified time.
Time Is Between: Checks if the time falls between two specified times.
Time Is Not Between: Checks if the time is outside the specified time range.
Time Is: Checks if the time matches the specified time.
Time Is Not: Checks if the time does not match the specified time.
Time on previous day
Is Previous Day Before: Checks if the time on the previous day is earlier than a specified time.
Is Previous Day After: Checks if the time on the previous day is later than a specified time.
Is Previous Day Between: Checks if the time on the previous day is within a specified time range.
Is Previous Day Not Between: Checks if the time on the previous day is not within a specified time range.
Is Previous Day At: Checks if the time on the previous day matches a specified time.
Is Previous Day Not At: Checks if the time on the previous day does not match a specified time.
Is Current Day Before: Checks if the time on the current day is earlier than a specified time range.
Is Current Day After: Checks if the time on the current day is later than a specified time range.
Is Current Day Between: Checks if the time on the current day is between a specified time range.
Is Current Day Not Between: Checks if the time on the current day is outside a specified time range.
Is Current Day At: Checks if the time on the current day matches a specified time.
Is Current Day Not At: Checks if the time on the current day does not match a specified time.
Is Next Day Before: Checks if the time on the next day is earlier than a specified time.
Is Next Day After: Checks if the time on the next day is later than a specified time.
Is Next Day Between: Checks if the time on the next day is within a specified time range.
Is Next Day Not Between: Checks if the time on the next day is outside a specified time range.
Is Next Day At: Checks if the time on the next day matches a specified time.
Is Next Day Not At: Checks if the time on the next day does not match a specified time.
True: Checks if logical TRUE value is returned
False: Checks if logical FALSE value is returned
The following table lists the operators that can be used with the corresponding field types to form a rule criteria in the If section:
Refer to the
FAQs
on performing calculations using conditional formula.