Can I do calculations based on my form fields?

Last updated Jun 04 2019


What is a calculated field?
The calculated field is one of many elements you can use. It enables you to make calculations based on data entered in your form fields.  Since calculations are the issue, then only fields holding numeric values can be included in the process. fields like: price element and numeric element.  Multi selection elements (dropdown, Radio button and checkbox) can also be used for calculating if they contain  numeric values in their "Advanced values". 

Following are two examples for using the calculated field:

Example #1: Calculation based on price elements
1- Create a new form 
2- Drag three price elements from the "Elements" panel > "Advanced" category
3- Give each price field a different name in the "Elements settings" on the right. (I called them: Price 1, Price 2 and Price 3).
4- Drag a calculated field from the "Elements Panel" > "Widgets" category


A calculator will automatically open so you can configure the calculation. You can press on the numbers or calculation marks, as well as
drag the price / numeric fields into this calculation.
In this example i dragged "Price 1" field, then pressed on "+". I  dragged "Price 2" next to it and pressed on "+" again. Finally i added "Price 3".
I saved this calculation and the form.

5-

When i tested it in my published form - i entered 3 different prices and saw the correct sum appear in my calculated field.

Example #2: Calculation based on Dropdown and numeric elements
1- Create a new form 
2- Drag a dropdown element from the "Elements" panel > "Basic" category > "Multiple Input"
3- Drag a numeric element  from the "Elements" panel > "Basic" category > "Input"

4- 

Change the dropdown label to "T-shirts" and the options to "red - 10, blue - 15 and green - 20.
Since the item names are strings, we need to create a numeric value so they can be used in the calculation.. Simply give each item a numeric value.
Go to : "Elements" panel > "Advanced" category > "Advanced values"
and enter the following values: Red=10, Blue= 15 and Green=20 in 

5-

Change the numeric label to : Qty



6- 

drag a "Calculated" element



7- and set the formula:
Drag the "T-shirts" field from the right side of the editor into the editor screen.
Press on the * button to add a multiplication sign and finally drag the Qty field after that.
Press "Apply" and save the form.


 8- Now you can publish your form as URL and check the calculated field.
Choose a shirt color and enter a Quantity. You will get your total sum in the calculated field.
Watch a video about the calculated field


CommentsLogin Required
  • Saurum Sergey05/10/2019 02:35
    To change the format of the calculated field you need to use the custom function mode which will allow you to use javascript.
  • CSS Evaluation05/09/2019 20:33
    How do you change the format of the calculated field? For example, I would like my calculated field to read: "10" with no decimal places. However, even when I change the inputs, it always defaults to "10.00". How do I get rid of the decimal digits?
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.