How to calculate total based on user selections?

  • newmethodanceministries
    Asked on October 12, 2015 at 3:17 PM

    I have multiple participant fields. Once the customer selects Yes to they would like to a T-shirt and the size (Plus sizes will be more), if each participant and T-shirt selection can be calculated into one total at the end

    For Example

    If a customer is registering 10 participants and each participant would like a T-shirt, 4 out of the 10 participants are plus size shirts.  (Workshop fee=$20 T-shirt Fee=$20/Plus Size $25.00)

    So that would be a total of $200 registration

    T-shirt Total $220.

    $420 would need to be calculated at the end. 

    Or for whatever they selected. How can I accomplish this?

  • Carina
    Replied on October 12, 2015 at 4:54 PM

    1. You can add a dropdown field with "How many participants do you want to register?"

    2. You can add calculation values to the fields, both the "How many participants" and for each t-shirt size:

    How to calculate total based on user selections? Image 1 Screenshot 30

    3. Now you can add a calculation widget and add all the fields to the calculation:

    https://www.jotform.com/help/259-How-to-perform-calculation-in-the-form 

    How to calculate total based on user selections? Image 2 Screenshot 41

    You can test and clone the demo form:

    https://form.jotform.com/52846585922972? 

    Let us know if we can assist you further.

  • newmethodanceministries
    Replied on October 12, 2015 at 5:23 PM

    not only that, the previous participant fields need to be calculated as well. Each participant field needs to be calculated

  • Mike
    Replied on October 12, 2015 at 6:45 PM

    This should be possible with custom calculations. I would like to suggest checking the next guides:

    1) How to perform calculation in the form

    2) How to assign calculation value

    3) How to pass a calculation to a payment field

    Take a look at 'Calculated amount based on user selections and inputs' section of the next article to see it in action.

    Mastering Payment Form Integrations with JotForm

    Thank you.

  • newmethodanceministries
    Replied on October 15, 2015 at 1:17 PM

    I appreciate all of your help. I went through all of the tutorials. I am still having issues with the calculations. I have tried EVERYTHING lol. 

    When they choose a class and or if they choose a t-shirt size, it should be calculated. the calculations do not add up correctly. What am I doing wrong? 

     

    https://form.jotform.com/50818701594964

  • Mike
    Replied on October 15, 2015 at 2:59 PM

    Your calculations look good in general, but it seems that there are missing plus symbols between tshirtSize and participantClass fields. Please add them and re-check the form.

    How to calculate total based on user selections? Image 1 Screenshot 20

    Thank you.

  • newmethodanceministries
    Replied on October 15, 2015 at 5:02 PM

    Ok I added the plus signs, but now it's not giving a total at all.

  • Mike
    Replied on October 15, 2015 at 6:22 PM

    I have removed the last plus sign, and calculations seems to be fine now.

    How to calculate total based on user selections? Image 1 Screenshot 30

    How to calculate total based on user selections? Image 2 Screenshot 41

    Please test the form now.

  • newmethodanceministries
    Replied on October 16, 2015 at 5:14 PM

    OMG IT WAS THAT SIMPLE??????????????!!!!!!!!!!!!!!!

  • Mike
    Replied on October 16, 2015 at 5:16 PM

    Yes, that was it. The web things are quite confusing sometimes :)