How to add up the cost when someone selects more than 5001 option?

  • merp
    Asked on October 16, 2014 at 3:54 PM
    not sure if this would be too advanced, but we have an options for "More than 5001 employees" which is $1.25 per employee. Is it possible to set it up so that if someone fills in a number more that 5001, it automatically adds the cost up?
  • David JotForm Support
    Replied on October 16, 2014 at 4:49 PM

    Hi,

    To accomplish this, you would need to have custom calculations in your form, then pass the calculated value to your payment form:

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

    http://www.jotform.com/help/275-How-to-pass-a-calculation-to-a-payment-field

    Here is a quick form I setup to show you what I mean:

    http://form.jotformpro.com/form/42886912279974?

    Essentially, I just setup the calculation values of the first three radio buttons to reflect how much they would cost and passed those values to the calculation widget.  The 4th radio button shows a hidden field when selected that allowed for the user to enter whatever they would like.  Then that value is multiplied by 1.25 and passed to the calculation widget.  You would then pass that value to your payment field.  

    Let us know if this is not what you were looking for or if you have any questions about the setup and we will be happy to assist you further.

     

  • merp
    Replied on October 30, 2014 at 10:41 AM

    Thanks for the help on this, David! I posted a reply on this last week, but I don't think it went through. What you created is exactly what we needed. Is there a way you can incorporate that to our Clone of Order Form http://www.jotformpro.com/form/42854078302959?

    I just wanted to see if you can mimic what you created on our form if possible so I don't have to recreate the wheel.

    Thanks again for the help and great support!

     

    -Josh

  • Charlie
    Replied on October 30, 2014 at 12:17 PM

    Hi Josh,

    If you wanted to get the form that my colleague, david, made. You can clone his form by following this tutorial or guide link: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL.

    I would also recommend that you read and explore the tutorials presented above, so that you may adjust the fields and calculations whenever it is necessary. 

    You can also follow the screenshots below to have a quick guide.

    1. Add the fields that are necessary. Add a radio button list and a textbox field. 

    How to add up the cost when someone selects more than 5001 option? Image 1 Screenshot 70

    2. Click on the "Conditions" setup and click "Show/Hide a form field" which in our part is the "Enter number of people" field.

    How to add up the cost when someone selects more than 5001 option? Image 2 Screenshot 81

    3. This will be the condition for it to show and hide the field.

    How to add up the cost when someone selects more than 5001 option? Image 3 Screenshot 92

    4. On your Radio Button field, right click or click on the settings icon and choose "Properties". Edit the "Calculation Values" to add the pricing to the order of the radio buttons.

    How to add up the cost when someone selects more than 5001 option? Image 4 Screenshot 103

     

    5. Search for the widget "Form Calculation" and click the Wizard settings.

    How to add up the cost when someone selects more than 5001 option? Image 5 Screenshot 114

    6. This is the calculation for your pricing. This simply means:

    Get the calculation values of the radio buttons * 1 (just a default to have a result) and multiply it to the number of people entered (the default is none not "0" so even though you choose radio button 1, the value won't change).

    How to add up the cost when someone selects more than 5001 option? Image 6 Screenshot 125

    The output will be showed in the actual Form Calculation field.

    I hope this helps. Let us know if you need further assistance on this. 

    Thank you.