In this guide, you’ll learn how to perform calculations in the Input Table field using the Conditional Logic and output the result on a text box field within the same Input Table field.
Here’s a demo form you can check: https://www.jotform.com/222510651473045. The result would look like the below image:
Adding the Input Table Field
First, you should have the Input Table field in the form. Here’s how you can add that:
- In the Form Builder, click the Add Form Element button.
- Scroll down to Survey Elements.
- Click the Input Table field to add. You can also drag and drop it into the form.
- Set it up according to your preferred columns and rows. Here’s an example based on the above demo form:
Now that you have the Input Table ready let’s set up the conditional logic to calculate the values.
Calculating the Values in Input Table With Condition
In the above form, the 1st, 2nd, 3rd, and 4th columns are summed up into the 5th column labeled Total. Here’s how you can do that:
- Go to the Settings tab.
- Click Conditions on the left panel.
- Choose Update/Calculate Field from the logic options.
- Create your conditional logic according to the below GIF:
Repeat the same step for the other rows.
If you also want to perform calculations on the field with a checkbox or radio button input types, refer to this guide: How to Perform Form Calculation in the Matrix Field.