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
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)
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"
var myVar = Textbox;
myVar = myVar.toLowerCase();
myVar = myVar.substring(0,2);
This will return "abc" as well.
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.
Watch a video about the calculated field