Create smart forms with dynamically calculated variables

Calculated fields are variables that can be used to create dynamic content, based on the answers from your respondents in your form. Think of calculating the price for a payment form, calculating the score of a quiz, or assigning a value such as a lead status to a respondent.

+ Create dynamic content
+ Calculate scores & prices
+ Assign text values

Calculated fields are available for free to all Tally users. Here's how to get started.

1. Create a calculated field

Insert a calculated field in your form by typing / followed by calculated field.

  1. Name your calculated field, to easily retrieve it in calculations later on
  2. Choose whether the value will be text or a numeric value
  3. Then add an initial value as a starting point of your calculation. This can also be zero or left blank.

2. Insert conditional logic

The value of a calculated field gets calculated by using conditional logic. Insert conditional logic by typing / followed by conditional logic.

Logic

The calculate action

Conditional logic allows you to perform multiple actions. When using calculated fields, we want to select the Calculate action.

Calculate-function

You can perform 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’)
  • Concatenate values: combine values in one string

An example

In this example the respondent can choose between 2 products. When the respondent chooses "Apple" we want to add $2 to our calculated field (the price). When the respondent chooses "Pear" we want to add $3.

  1. Add conditional logic using the Calculate function:
    • When the answer to the question Choose a product contains the answer Apple ($2)
    • Then Calculate our calculated field Price and Add+ the value of 2
  2. Repeat this for the answer option Pear ($3)

3. How to use calculated fields

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

Display a calculated field in your form

To mention your 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.

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 the answers of your respondents.

  1. Insert a payment form
  2. Choose your calculated field from the Price dropdown menu in your payment block
  3. The price will now automatically and in realtime be updated according to your respondent's answers

How to create a checkout form and apply a discount code

Dynamic redirect on completion

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.

  1. Insert a calculated field and name it (for example: URL).
  2. Insert conditional logic and assign a URL based on your conditions.

In this example we want to redirect respondents that choose "Pricing" to the landing page "acme.inc/pricing" and respondents that choose "News" to the landing page "acme.ince/blog" when they submit the form.

  1. Go to form settings → Redirect on completion, click or type @ and choose your calculated field from the dropdown menu.

4. Your form will now redirect respondents dynamically based on their responses.

Dynamic email notifications

Use calculated fields to customize the email body or recipients of your respondent or self email notifications. Here's how it works.