How can I conditionally hide/show fields based on a calculated range of checkboxes?

  • Profile Image
    Asked on January 06, 2017 at 02:00 PM

    Hello, how are you!? Hope so!

    See if they can help me in the development of a form of which as the user selects his or her points and according to the sum of these points, we present different answers.

    Here is an example page:

    Each selection has a value. When adding all the selections made by the user, we must present a message if:

    - Total sum is up to 10, show message 1

    - Total sum to be up to 11 to 20, show message 2

    - Total sum to be up to 21 to 30, show message 3 ... 

    We can not show the sum and total of these points. Only the final message.

    Is this possible? Can you help me?


    Thank you very much


  • Profile Image
    Answered on January 06, 2017 at 03:54 PM

    I checked that page but failed to find any JotForm form embedded on it.

    I'll just assume you're working on this form

    I noticed you have a set of Checkboxes along with a Number Field that was supposed to fetch the total based on the selected options on the checkbox.

    However,  you setup your conditions like so:

    Please delete those 2 conditions. Keep in mind that that's not how conditions and calculations work. Before you proceed, I strongly urge you to refer to the following guides to learn more on how to use these:

    Conditions: Smart-Forms-Using-Conditional-Logic

    Calculation: How-to-Perform-Calculation-in-the-Form

    Now, to get the total calculated value of the selected options on the checkbox, all you have to do is setup one condition like below:

    This means that IF Selecione as opções do teste IS FILLED then copy its value to Resultato.

    To add a message that will appear conditionally, depending on the total value, just add 3 Text Fields. Since I don't know what the exact message is, I'll just use your post as an example:

    And lastly, just setup the conditions to take care of that:

    Here's the completed form: I purposely didn't hide the Resultato field for testing purposes.

    I recommend you clone it, here's how, if you want to have a closer look. Give it a spin and let us know if you'd need more help.

  • Profile Image
    Answered on January 06, 2017 at 03:59 PM


    Just some minor changes to the conditions. Please refer to the image below:

  • Profile Image
    Answered on January 09, 2017 at 11:14 AM

    Hello Jim_R, thanks for your great help! I hope I'm on the right track! When possible, could I look again at the adjustments I made and point out where I'm going wrong? I think it's a simple thing to solve. Thank you very much for your attention.

    Form link:

  • Profile Image
    Answered on January 09, 2017 at 01:10 PM

    I have inspected your form and you are passing value from calculation to text field. For text field it is not possible to use Greater or Less inside of conditional logic.

    First you need to replace text field with number field or with Form Calculation widget

    How to Perform Form Calculation Using a Widget

    After that cahnge your conditions and set them like this. 

    Here is my form: 

    Feel free to clone it

    You can also clone the form that my colleague Jim_R provided you. 

    Hope this will help. Let us know if you need further assistance. 

  • Profile Image
    Answered on January 09, 2017 at 05:04 PM

    Perfect! Thank you very much.