How to perform calcultions with validation?

  • Marco Tsang
    Asked on March 18, 2024 at 6:40 AM

    Is it possible to do the following using jotform?

    Q1. Total No. of Failed Students [a number]

    Q2. Reason 1 for Failing [a number]

    Q3. Reason 2 for Failing [a number]

    ...

    And Q2+Q3... must be = Q1?

  • Raymond JotForm Support
    Replied on March 18, 2024 at 7:31 AM

    Hi Marco,

    Thanks for reaching out to Jotform Support. With Jotform, you can create your forms, and apply calculations and validations on them. Let me show you how to perform calculations with your form:

    • In Form Builder, click on the Add Element button on the left
    • Under the Widgets tab, click on the Form Calculation widget.
    • In the Form Calculation Widget, use the Add Field button and mathematical operators to perform your calculation:
      How to perform calcultions with validation? Image 1 Screenshot 50

    Now, we can use a Paragraph field and conditions to perform validations. Let me show you an example below:

    • On the Form Elements menu, I used the Paragraph element to create my error message.
      How to perform calcultions with validation? Image 2 Screenshot 61
    • Now, click on Settings and Conditions.
    • Create a new Show/Hide field condition similar below:
      How to perform calcultions with validation? Image 3 Screenshot 72

    Here's how my demo form will work:

    How to perform calcultions with validation? Image 4 Screenshot 83

    That's it. We also have a guide on How to Perform Calculations Using a Widget that you can check out.

    Give it a try and let us know if you need any help.