Skip to main content

Calculation Field

The Calculation Field allows you to perform calculations within your form and display the results on the front end if desired. Follow these steps to set up a basic calculation field.

Step 1: Add a Calculation Field

Add a new field and set the Field Type to Calculation Field. Select Calculation Field

Step 2: Set Up the Calculation Formula

  1. In the field settings, scroll to the Calculation Options section and open it.
  2. In the Calculation Formula field, enter your calculation formula.

Getting Field Values for Calculation

Use Field IDs for the Fields for Calculations to reference field values.

Using Field Values in the Calculation

Enclose the field ID in double percent symbols. For example, %%directory_plugin%%.

Writing a Calculation Formula

Write simple or complex formulas. For a basic example, add the following fields: ai_plugin, directory_plugin, and ecommerce_plugin:

%%ai_plugin%% + %%directory_plugin%% + %%ecommerce_plugin%%

Formula

info

To learn more about creating formulas, please refer to this doc.

Step 3: Display the Result

Show the Result on the Frontend

  1. Enable the Show Result on frontend option.
  2. Define how to display the result in the Result Content field using %%result%%. For example:
Your score is %%result%%!

Show Result on frontend

Preview

Add the Result to Email Notifications and Confirmations

If not using a template, the calculated value is included in emails automatically. For templates, add the Field ID of the Calculation Field to include the result.

Additional Options

  • Calculate on server side: Perform calculations using PHP and MathExecutor instead of JavaScript.
  • Calculate Condition: Add conditions for performing calculations when showing results on the frontend.
    • Calculate Condition Relation: Specify if any or all rules must be met.
    • Calculate Condition Rules: Define the rules for the calculation.