What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Conditional calculation based on quantity

    Asked by kg87 on February 02, 2017 at 09:01 AM

    I have another question, i'm  not sure if this will be possible. I would like to make a calculation as follows.

     

    Instead of selecting how many people, if you typed in the quantity instead and it would register the amount per person for that number. (e.g. Writing 220 people is the same as selecting the box 201-399)

     

    X amount of ppl x price per head - 10%, 20 or 30% = Quote

     

    201-399 -10% 

    400-599 -20% 

    600+ -25%

     

    I hope this makes sense!

    Page URL:
    https://eu.jotform.com/70293828480361

  • Profile Image
    JotForm Support

    Answered by Welvin on February 02, 2017 at 09:53 AM

    I think you can use the Less Than and Greater Than to get the desired calculation. The discount by percentage can be calculated normally, like if they select 201-399. I will try to figure this out and let you know.

  • Profile Image

    Answered by kg87 on February 02, 2017 at 10:13 AM

    Thankyou, Glad you managed to understand my question!

  • Profile Image
    JotForm Support

    Answered by Welvin on February 02, 2017 at 10:47 AM

    Please check this form: https://www.jotform.com/70324145079958. Enter below 200 value in the "How many people?" field. Check if the quote calculation is correct. 

    Example:

    If this is correct, I'll explain to you how to get the result. 

  • Profile Image

    Answered by kg87 on February 03, 2017 at 06:44 AM

    Hi,

    I don't think that is correct. The quote calculation i'm trying to achieve is a 

    Less Than and Greater Than to get the desired calculation.

     

    So a number below 400 would equal (-10% off)

    a number below 600 would equal (-20% off) etc

     

    The calcultion would be 

     

    X amount of ppl x Menu order (3 different values to choose from) = Quote

  • Profile Image

    Answered by Boris on February 03, 2017 at 08:00 AM

    Thank you for the added clarifications, please see the following demo form:

    https://form.jotformpro.com/form/70333011745950

    In the demo form, the numbers you enter on the How many people? and the Price Per Person fields will determine the total price. The Quote calculation is performed as follows:

    Party Size * ( How many people * Price Per Person )

    Where Party Size will be 1 if under 200 people, will be 0.9 if 201-400, 0.8 if 401-599, and will be 0.75 if people are 600+.

    I'm not sure how you intended to calculate the Price Per Person field, but based on your description so far, this seems to be what you wanted for the Quote calculation. Please check, and if it is, we'll gladly provide you with the steps on how to re-create such a setup.

    Looking forward to your response.

  • Profile Image

    Answered by kg87 on February 03, 2017 at 08:11 AM

    Hi, thanks for your response. I think it's nearly there.

    The amount of people in the box would then be multiplied by the menu options. (Raclette £11.95, Raclette & Poutine £14.55, Raclette & Poutine & Hotdog £16.50).

    But depending on the amount of people there would be discounts applied (-10% for number between 201-399) (-20% for a number between 400 –599) (+25% for number between 600+)

    The price per person does not need to be shown now, only the final quote.

     

    Thanks again,

  • Profile Image

    Answered by Boris on February 03, 2017 at 08:34 AM

    Please check the form again, and see whether that works to your satisfaction:

    https://form.jotformpro.com/form/70333011745950

    What we have done to achieve it is we have assigned calculation values to different options in your Party Size and Menu fields:

    https://www.jotform.com/help/301-How-to-Assign-Calculation-Value

    For the Party Size field, I've assigned it calculation values you wanted for your discount. First option has a value of 1 (meaning it is 100% of the price).

    Second option has value 0.9 (meaning 90% of the price).

    And so on for the Party Size field. For the Menu field, I've assigned the prices for the three options as you've provided them in your last response.

    Finally, the Quote calculation was set as follows:

    Party Size * ( How many people * Menu )

    This describes the calculation itself, but what my colleague also did earlier on is to make sure that the Party Size field has its value selected based on the number that your users enter inside the How many people field.

    This was achieved by using the insert / calculate type of conditions:

    https://www.jotform.com/help/268-How-to-Insert-Text-or-Mathematical-Calculation-into-a-Field-Using-Conditional-Logic

    If the form is functioning the way you wanted it to, please feel free to clone it into your own account for taking a closer look into how it was set up. You can clone it by following this guide:

    https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    Please let us know should you need any further assistance, and we'll be glad to help. Thank you.

  • Profile Image

    Answered by kg87 on February 03, 2017 at 08:39 AM

    Thankyou!! That is great :) really appreciate your help.

    I will go through and check it all works

  • Profile Image

    Answered by kg87 on February 03, 2017 at 08:51 AM

    Thanks again, the only other question I had is whether it would be possible to hide the party size. So that the customer only sees HOW MANY PEOPLE and the QUOTE?

     

    Thanks!

  • Profile Image

    Answered by Boris on February 03, 2017 at 08:56 AM

    As this is a different question unrelated to the topic about the calculation itself, it has been moved to a different support thread to avoid unnecessary confusion:

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

    We will assist you with it there, shortly. Thanks!