Calculated Field

Last updated Apr 04 2018

The calculated field
The calculated field is a special element with which you can create formulas based on your form fields. 
It allows you to create 2 types of formulas:
1- Formula for numeric calculations
2- Formula for text strings

For each of these options you can also switch to function mode but ticking the "Function mode" checkbox. This willl allow you to use JavaScript to build the formula.

Formula for numeric Calculations
This allows you to use the numeric values entered in your form for making calculations. 
When you first drag a calculated element into your form it immediately opens up an editor window. The editor layout contains a "screen" ontop,  digits (0-9) and mathematical operations (+,-,:,x) on the bottom left side and the form fields on the right.
The digits and operations are used same as in a regular calculator: by clicking on them. As for the form fields - you can simply drag them into the editor screen and combine them with the mathematical operations and numbers. 
Since calculations are the issue, then only form fields holding numeric values can be included in the process. fields like: price element, numeric element and star rating or Multi selection elements (dropdown, Radio button and checkbox) when they contain  numeric values in their "Advanced values". 

For example: if you want to calculate the total price of T-shirts someone ordered you can simply drag the price element, add a multiplication sign next to it and then drag the quantity field right after that: Price x Quantity.
Learn more about how to use the calculated field for calculations.

Formula for text strings
This allows you to use create a string of text by combining digits (0-9), spaces, and values entered in your form fields.
Since there is no calculation involved, the you can use any field in your form.
Learn more about how to use the calculated field for Text strings


Function mode (string mode)
When this checkbox is enabled the calculated field will allow you to use JavaScript to perform the calculation.

For example if Textbox is "ABC" and Textbox2 is 12345678

The formula Textbox.toLowerCase()+TextBox2.substr(2,3) will return "abc345".

The formula Textbox.toLowerCase().substring(0, 2)  will return "abc"

You can also use more complex JavaScript, like the following:

(function f(){

var myVar = Textbox;

myVar = myVar.toLowerCase();

myVar = myVar.substring(0,2);

return myVar;


This will return "abc" as well.

For a full list of JavaScript string methods see W3 Schools

To calculate numeric values, you need to convert them to integers or decimals.

For example, if Numeric is 15 and Numeri2 is 5

The formula Math.pow(parseInt(Numeric),parseInt(Numeric2)) will return 759375.

For a full list of JavaScript Math methods see W3 Schools

The JavaScript option is not limited to string or math functions, you can use date functions any other JavaScript functions.

Watch a video about the calculated field

CommentsLogin Required
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.