Calculating totals?

  • Profile Image
    Asked on November 23, 2011 at 05:44 PM

    I have a form which asks participants in a Personal training course how many times per week they do certain things, like drinking 2 litres of water, not eating dairy or meat and drinking alcohol.

    The form asks them to check boxes and then put a total out of 7 days. It then goes on to ask them a grand total for all questions.

    Is there a way to automatically calculate all totals based on the number of check boxes selected.

    I know that Jotform has this functionality already as the payment system calculates a total amount for products selected. What I want to do is far simpler and just calculate the number of checkboxes selected in a particular selection applying +1 per checkbox to a total and then calculating a total at the end of the form which adds the total of all checkboxes on the form.

    Is there a way to do this in jotform, or do I need to download the whole form with css and js and edit the js to add in classes here for calculation?


    Form is here:



  • Profile Image
    Answered on November 23, 2011 at 05:57 PM

    Hello Adam,

    I am sorry to inform you but we do not have such an option.

    You are completely right about downloading the source code and then adding that feature manually.

    Thank you very much for using our services.

    Please feel free to contact us if you need any other assistance.

  • Profile Image
    Answered on November 23, 2011 at 06:00 PM

    OK, thanks! Would you like the code when I'm finished?

  • Profile Image
    Answered on November 23, 2011 at 06:03 PM

    It would be nice if you post the code here. It may help some other JotForm Users in the future.

    Thank you very much for your cooperation :)

  • Profile Image
    Answered on November 23, 2011 at 06:09 PM

    Adam, i had just made a start in experimenting with some code for you. 

    Please, please post your code if you can make it happen yourself. 


    If you do need any help, i may be able to come up with something, so just let us know.


    p.s I was going to just make use of the prototype js framework as its already loaded for the standard JotForm code. 

  • Profile Image
    Answered on October 09, 2014 at 05:50 AM

    how can i use calculate the total of no.of days in check-in date and check-out date id there a features in jotform?


  • Profile Image
    Answered on October 09, 2014 at 08:57 AM


    We have moved your question to a separate thread here

    We'll answer your question on that thread shortly. Thanks!