Calculated fields

Calculated fields are variables you can use to create dynamic content based on respondents’ answers. Think: calculating the price for a payment form, adding up a quiz score, or assigning a value such as a lead status to a respondent.
notion image
 
Calculated fields are available for free to all Tally users.
Calculated fields are available for free to all Tally users.
 


 

Create a calculated field

Insert a calculated field in your form by typing /calculated field. In most cases, it’s best to add calculated fields on top of the form.
 
notion image
 
  1. Name your calculated field to easily retrieve it in calculations later on
  1. Choose whether the value will be text or a numeric value (number)
  1. Then, add an initial value as a starting point of your calculation. This can be zero or left blank.
 

Insert conditional logic

Before determining the value of a calculated field, you need to add conditional logic to your form. Type/logic to insert it below your calculated field block.
Only you can see the calculated field and conditional logic blocks—respondents won’t see them on your published form.
 
notion image
 

Add calculate action

Conditional logic allows you to perform multiple actions. When using calculated fields, you want to select the Calculate action.
 
notion image
 
You can perform several numeric and textual operations with the Calculate action:

Numeric operations

  • Add a value
  • Subtract a value
  • Multiply with a value
  • Divide with a value
 

Textual operations

  • Assign: add a text value (for example, ‘hot lead’). Respondents won’t see this information unless it’s mentioned elsewhere in the form.
  • Concatenate values: combine values in one string. To use this, you need to select Text when creating a calculated field.
 
Calculations on date blocks are not available yet.
Calculations on date blocks are not available yet.
 

Calculated fields example

In this example, the respondent can choose between two products. When they choose "Apple", we want to add $2 to our calculated field (the price). When the respondent chooses "Pear", we want to add $3.
Follow the steps below to set up this calculated fields example:
  1. Add a Checkbox block with two product options by typing /checkboxes and giving it a “Choose a product” title or label
  1. Insert a Calculated fields block by typing /calculated fields
      • Add a field name (”price”)
      • Select Number
      • Leave the initial value field blank or type zero
  1. Add Conditional logic and use the Calculate function:
      • When the answer to the question Choose a product contains the answer Apple ($2)
      • Then Calculate the calculated field Price and Add+ the value of 2
  1. Repeat this for the answer option Pear ($3)
 
notion image
 
Once you’ve set this up, read our guide below on using the calculated fields and making them visible to your respondents.
 
If you’re looking for product checkout templates, view our simple or advanced checkout templates.
If you’re looking for product checkout templates, view our simple or advanced checkout templates.

How to use calculated fields

By default, calculated values are not visible in your form. You can find them in the Submissions tab of your form, but you can also display the calculated values in your form, use them in a payment form, or create a dynamic redirect on completion.

Display a calculated field in your form

To mention the calculated value in your form, simply type @ and choose the calculated field from the dropdown menu. You can use this to show a final price, score or quiz result in your form.
If you want to calculate and display currency, add your currency symbol directly before the linked calculated field, like in the example below.
 
notion image
 

Dynamic pricing in a payment form

You can use a calculated field to calculate the price of your payment form and make it dynamic based on your respondents’ answers. This means the price will change based on other inputs and logic.
  1. Type /payment to insert a payment form.
  1. Choose your calculated field from the Price dropdown menu in your payment block.
  1. The price will now automatically update according to your respondent's answers, for example, if they select different product types or quantities.
 
notion image
 
 

Dynamic redirect on completion

You can use calculated fields to redirect respondents to different landing pages, based on their responses. You can do this by using a calculated field as your Redirect on completion link. After creating your form:
  1. Insert a Calculated field and name it (for example, “URL”)
  1. Insert Conditional logic and assign a URL based on your conditions
 
In the example below, we want to redirect respondents who choose "Pricing" to the landing page "acme.inc/pricing" and respondents who choose "News" to the landing page "acme.ince/blog" when they submit the form.
In the example below, we want to redirect respondents who choose "Pricing" to the landing page "acme.inc/pricing" and respondents who choose "News" to the landing page "acme.ince/blog" when they submit the form.
 
notion image
 
Go to form settings and enable Redirect on completion. Click or type @ and select your calculated field from the dropdown menu.
 
notion image
 
Your form will now redirect respondents to different URLs based on their responses.
 

Dynamic email notifications

You can use calculated fields to customize the email body or recipients of your respondent or self email notifications. Learn more about dynamic email notifications here.