How to do calculations based on checkboxes

  • jabedoya60
    Asked on September 24, 2017 at 1:41 PM

    Hi guys, I have a form for our school, were we are going to be offering special classes for our students, each class has a check box with the price for the class and a description, I added a Form Calculation Widget, but I don not know how to add the check boxes values? Please take a look at my screenshot, also

    I will like to take off space in between the check boxes with the prices and the description of the class.
    Thank youvery much! James
    Jotform Thread 1256234 Screenshot
  • jonathan
    Replied on September 24, 2017 at 2:23 PM

    Please refer to our user guide on : How to Assign Calculation Value

    You should be able to add the checkboxes value this way.

    Let us know if you need further assistance on this.

    ---

    The other question is about a different feature. We will resolve it on another thread here https://www.jotform.com/answers/1256253





  • jabedoya60
    Replied on September 24, 2017 at 3:41 PM

    Hi Jonathan, I did your suggestion and it did not work at all. please that a look at my screenshot again, please see that the options with price values are not together, again, can you please check or inspect my form? Thank you.

  • Mike
    Replied on September 24, 2017 at 5:02 PM

    It should work if you add the calculation values like this:

    How to do calculations based on checkboxes Image 1 Screenshot 40

    How to do calculations based on checkboxes Image 2 Screenshot 51

    Then, add the formula to the calculation field:

    How to do calculations based on checkboxes Image 3 Screenshot 62

    Please give it a try and let us know if you need any further assistance.

  • jabedoya60
    Replied on September 25, 2017 at 9:02 PM

    Hi, I tried it and it still does not work, I matched what you have in your screens, I don't know if I missed something, any help will be much appreciated. Thank you very much, James

  • Kevin Support Team Lead
    Replied on September 26, 2017 at 12:49 AM

    I have been testing your form and as far as I can see it calculates the total; however, I would recommend you to assign calculation values to your options since the "Calculation Values" property is enabled. 

    You will find such option on the field settings, under the options tab: 

    How to do calculations based on checkboxes Image 1 Screenshot 20

    Please do the same with all the check boxes included in your calculation. Also, set up the value with numbers only, using other characters may generate conflict at the moment of the calculation. 

    I hope this helps. 

  • jabedoya60
    Replied on September 26, 2017 at 10:07 AM

    Great is working now, thank you, just one more thing, is there a way for the Total field to have as a default the dollar sign character "$", so when the total prices are added the dollar sign is in front of the numbers?

  • Marvih
    Replied on September 26, 2017 at 11:54 AM

    You just add a new "Conditional Logic" using UPDATE/Calculate Field. Then follow the image below.

    How to do calculations based on checkboxes Image 1 Screenshot 30

    It is also advisable to set your "Total" field as "Read-only" to prevent your customer from editing the total value.

    How to do calculations based on checkboxes Image 2 Screenshot 41

  • jabedoya60
    Replied on September 26, 2017 at 12:32 PM

    Hi Marvih, for the first question, I do not know where to place $Total:0-9, if you look at my at the Total field, I can't even find the $ symbol?

    For the second question, in the calculation widget I cannot find either the check box for Read Only, I do not know how you got that screenshot animation above, please help, look at my form, am I looking at the wrong places?
  • Kevin Support Team Lead
    Replied on September 26, 2017 at 12:43 PM

    @jabedoya60, 

    In order to better assist you and avoid confusion, I've moved your questions to different threads, we will help you as soon as  possible on the following threads: 

    https://www.jotform.com/answers/1258122

    https://www.jotform.com/answers/1258121 

    Thanks.