-
leubasketballAsked on August 14, 2018 at 4:35 PM
I have a series of connections I need to do. I am selling tickets to a series of events and limiting each event to 6 tickets per event, $50 a ticket. I am using the Purchase Ticket widget for that.
People can purchase tickets to multiple events and so I need to pass the total number of tickets selected through the calculation widget and then pass the total cost into PayPal.
EG: if they select 3 events $150 gets passed into PayPal
Trying to figure it out, but struggling.
Thanks in advanced
Page URL: https://form.jotform.com/82255942703155 -
David JotForm Support ManagerReplied on August 14, 2018 at 6:21 PM
You just need to select a condition, for example, if only one selection can be made in your Ticket Purchase, you can create the following condition:
Then, pass the total from the calculation field to the payment field as shown on this guide: https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field
Check the example: https://form.jotform.com/82257210438958
Note: if you want the user to be able to select more than one item, then split them into a separate Ticket Purchase widget each, and add a Form Calculation widget for each, where you should perform a conditional calculation. Then you can calculate the final total into a new Form Calculation widget that you can pass to your PayPal field.
-
leubasketballReplied on August 14, 2018 at 8:26 PM
So they can select more than one. Is there a cleaner solution than separating them out?
-
BJoannaReplied on August 15, 2018 at 2:30 AM
There is a workaround, but you will have to add 4 additional fields and conditions to your form. You will also have to perform the calculation with the Form Calculation widget. Also, you will need to remove max selection for the Ticket Purchase widget.
I added 4 additional field to my form, one form each Ticket Purchase option, to which I am passing the value 1 if the corresponding Ticket Purchase option is selected.
How to Insert Text or Calculation into a Field Using Conditional Logic
After that, I set the following calculation inside of the Form Calculation widget.
Here is a demo form - https://form.jotform.com/82260898945977
Feel free to test it and clone it.
The fields Sept. 6, Sept. 13, Sept. 20, Sept. 27 and calculation can be hidden.