We have just implemented this as a new feature allowing the use of Calculations based on specific conditions.
- Go to the Form Builder’s Settings tab.
- Click Conditions on the left.
- Select the Update/Calculate Field option.
- Set the DO statement to Calculate a field’s value.
A new section will appear where you can add form fields by clicking the Add Field button.
You can also insert values, operators, and functions using the virtual numeric keypad.
As an example, we’ll be using this simple multiplication fieldset consisting of 3 Number elements where we insert the product of the first two fields into the third:
The Conditional Logic would look something like the following:
Notice the field labels have a trailing [0-9], meaning their value is numeric.
To break that down:
- We’ve set the condition or IF statement to check if the Multiplicand field “Is Filled”.
- The action or DO statement will insert the result of the expression “Multiplicand * Multiplier” into the Product field if the condition is met.
After clicking the Save button, this is what it looks like in my conditions list:
Now how to insert static text? Simply type the text in the textarea under the DO statement.
We’ll be using this fieldset consisting of a Single Choice element as the input field and a Short Text element as the output field for the condition:
Here’s what its Conditional Logic looks like:
The setup will insert the text “Hello World” into the Output field if the Insert “Hello World” into Output field is a “Yes”.
To learn more, here’s the demo form used for the steps mentioned in this guide.
Congratulations! You’re now able to insert static text or perform your own calculations using conditional logic.
Here are some related guides that you might also want to check out:
- How to Populate Field with a Value from Another Field
- How to Manipulate Text String with Conditions and Calculation
Got questions? Please let us know below!