SvenErikAsked on May 07, 2019 07:40 PM
I've been trying to figure out how to create a discount in JotForm. What I need is a form where customer can order events (or tickets if you like), so they have to insert the number of people who are coming to the event, and then, if they are 10, they will get a discount of lets say 10 %. If the group of people is 20, they'll get 20% off. And I need this to automatically calculate so the total amount will be correct.
Is there a way to do this? Would really appreciate some advice on this.
I'm also thinking the rice should be different for children, teenagers and adults, but the discount is the same for all groups.
Jed_CReplied on May 07, 2019 08:22 PM
You'll need to make a custom calculation and pass those calculation value to another field in order to achieve this.
Here's what you need.
1). Let us say you are using PayPal, set the payment field as a "User defined amount" as we will be passing the total calculated amount into that field.
2). Create a field that will hold the value of how many persons they will be registering. You can use the spinner field in this case.
3). Add a calculation widget for your discount field https://widgets.jotform.com/widget/calculation. You can perform a calculation like this:
What I did was I multiplied the number of people and divided it by 100 to get it's percentage. For example, for 10 people, the total discount would be $1. For 20 people, the total discount would be $4 and that's for the 20% discount.
4). Lastly, you'll need to pass the total value in the form calculation widget into your payment field by assigning the field to get the value from the form calculation widget https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field.
Check my sample form here https://form.jotform.com/91268107000950.
Feel free to clone it https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL so you can see how I applied the suggested method above.
Let us know if you have any questions or if you need further assistance.