How to create a Raffle Ticket form

  • Brad_Grier
    Asked on April 10, 2024 at 10:58 AM

    I have not started but am looking to create a raffle for where a user can buy multiple tickets. Will that user receive unique ticket numbers for each ticket purchased? So if a user would buy 10 tickets, would they get 10 separate unique ticket numbers or just 1 for the purchase?

    Also, and more importantly, can a user that purchases multiple tickets be separated to multiple line items? So If a user purchased 1 ticket they would be listed as 1 line item and if a user purchased 5 tickets, they could be listed as 5 line items so when exported to an excel file the winner could be picked at random by line item number?

    I hope this makes sense. We are trying to use a ping pong ball style machine to pick random number in a live drawing. So if the number 528 would be picked then we would go to line #528 on an excel sheet for the winner. I'm just not sure how to do this if a person purchases multiple tickets at once.

    Hopefully this could be set up to all save automatically to a Google sheet.

    Thanks.

  • Rene JotForm Support
    Replied on April 10, 2024 at 1:58 PM

    Hi Brad,

    Thanks for reaching out to Jotform Support. I understand you're planning to create a Raffle Ticket Form wherein form users can purchase multiple tickets and get unique ticket numbers for each purchase. That can definitely be achieved by using the Random Value Generator widget. In order to choose winners at random, the aforementioned widget will produce a random set of values that may be used as ticket numbers. Before we begin, please keep in mind that the sample steps will use values as examples to provide a foundation for the form you will create. You can alter those parameters based on your requirements and preferences. They will only be used to help you through the procedure. Let's start:

    1. On Form Builder, start by adding a Dropdown field. Click Add Form Element on the right and look for the said field under Basic tab.
    2. Once added, click the gear (Properties) icon on the right side of the field and go to the Options tab. Add the numbers that will signify the amount of tickets form users can select in the Options box (e.g. from 1-5 tickets). Make sure to press Enter for every number added. How to create a Raffle Ticket form Image 1 Screenshot 150
    3. On the same settings, scroll down and toggle Calculation Values to ON, so you can put values that will represent as ticket prices for every quantity selected. I started with $2 per ticket. You can play with it if you want to add discounts for multiple tickets, and it will just be calculated accordingly. How to create a Raffle Ticket form Image 2 Screenshot 161

    Once done, start adding the Random Value Generator widget. Since this example utilizes a maximum amount of 5 tickets per submission, I will be adding 5 of the said widgets so every ticket will have its own unique values. Here's how:

    1. Click Add Form Element again and go to the Widgets tab. Search for Random Value Generator and add 5 of them into your form. How to create a Raffle Ticket form Image 3 Screenshot 172
    2. Next, click the wand (Widget Settings) icon on the right of each widget and start setting up the values. I used the default 10 Characters for this one. As for the Allowed Characters sections, I chose numbers so it will correspond accordingly to ticket numbers.
    3. Scroll down and hit Update Widget once done.
    4. And then, click the gear (Properties) icon and toggle Shrink to ON, so the widgets won't take too much space in the form.
    5. Do the above steps to all 5 widgets. How to create a Raffle Ticket form Image 4 Screenshot 183

    Once done, you may now set the Conditional Logic for the Dropdown menu, and the Random Value Generators widgets. They will be set so that only a certain number of widgets will show up based on the values selected from the Dropdown. Let's begin:

    1. Choose Settings on the orange navigation bar on Form Builder.
    2. Go to Conditions on the left panel and select Show/Hide Field from the list.
    3. Start adding the conditions.
    4. Once done, hit Save. How to create a Raffle Ticket form Image 5 Screenshot 194

    Here's a close-up of the condition:

    How to create a Raffle Ticket form Image 6 Screenshot 205

    And here's how it'll look like if conditions were set for all selections in the Dropdown menu:

    How to create a Raffle Ticket form Image 7 Screenshot 216

    The next thing you need to add is the Form Calculation widget. It will be used to generate the total price the form user needs to pay per number of tickets purchased. This will correspond directly to the payment section we will be adding later. I'll walk you through setting that up:

    1. Once Add Form Element is clicked, go to the Widgets tab again and search for Form Calculation widget and then add it into your form.
    2. Click on the wand (Widget Settings) icon and then go to Add Field.
    3. Select the Dropdown (How many tickets?) and hit Save.
    4. Click the gear (Properties) icon next and toggle both Shrink and Hide to ON. This widget doesn't need to be visible on the form. It will only be visible on your end so you can have a basis on how much per ticket purchased. How to create a Raffle Ticket form Image 8 Screenshot 227

    The last thing to be added into the form is the payment gateway to be used to pay for the tickets. This will now depend on what you will use, but for this example, I will be using PayPal. Let's begin:

    1. Select the Payments tab once Add Form Element is clicked and add PayPal into your form.
    2. Make sure to select User Defined Amount on Payment Type.
    3. Scroll down and go to Get Price From and select Total Cost (Form Calculation widget).
    4. Click Connect to start the integration.
    5. Once done, hit Save. How to create a Raffle Ticket form Image 9 Screenshot 238

    Finally, I added the Full Name and Email fields, so submissions can be defined per form user, and an Autoresponder Email can be sent to them for confirmation. Here's the final look of the form:

    How to create a Raffle Ticket form Image 10 Screenshot 249

    And here's a sample email form users will receive so they have a copy of the ticket numbers they got upon submitting their entries:

    How to create a Raffle Ticket form Image 11 Screenshot 2510

    Please know that the submissions, when checked from the form's Tables and downloaded as an Excel file, will show data by column. That means, every ticket number will be aligned in columns, not rows. Here's a screenshot of a test submission made on the form:

    How to create a Raffle Ticket form Image 12 Screenshot 2611

    You may still need to take the ticket numbers and paste them into another Excel file to align them per row. So that during your live drawing, you can pick a random number depending on the aligned ticket number, as shown in the screenshot below:

    How to create a Raffle Ticket form Image 13 Screenshot 2712

    Another suggestion is to copy the ticket numbers and use an online randomizer website to draw winners. I found this website that you can use for that function. Here's how it looks like:

    How to create a Raffle Ticket form Image 14 Screenshot 2813

    Here's a demo form you can check for basis. If necessary, you can clone it rather than creating a new one and simply modify the parameters.

    Let us know if you have any other questions.

  • Brad_Grier
    Replied on April 16, 2024 at 10:04 AM

    Thank you for explaining that. I do have a couple questions.

    If someone would want to buy 20 tickets for this, either I would need to set the value up for 20 slots instead of 5 or if kept at 5 the user would need to purchase 5 tickets 4 times - is that correct?

    Also, will numbers repeat themselves for tickets? Meaning if I want to set a limit of 1000 tickets and we have 700 different transactions, none of those ticket numbers will repeat - is that correct?

    And maybe this is not the correct way to run this. hear me out.

    -------------

    I was thinking maybe a better approach would be to sell tickets (user can pick the number of tickets they would like to purchase), then have 1 ticket number for validation, but (and here is the tricky part) - can a line item be created for each ticket sold?

    Meaning if I buy 1 ticket, when it saves my purchase order, it would save as 1 line item. But if I buy 5 tickets, it would save my orders as 5 line items.

    Is something like that possible? Either when it saves to the Jotform Table, or by saving to a Google Sheet on checkout?

    This way might be easier and then would also go back to where my boss wanted to use a physical ball machine to pick numbers at a live event. (If 4 balls are picked and the numbers come up 3105, we would just got to line 3105 on the table for the winner). I hope this makes sense and is possible.

  • Rene JotForm Support
    Replied on April 16, 2024 at 10:45 AM

    Hi Brad,

    Thanks for your feedback. I’ll need a bit of time to look into this. I’ll get back to you as soon as I can.

    We appreciate your patience while we work on a solution.

  • Brad_Grier
    Replied on April 16, 2024 at 10:54 AM

    Thank you for looking into it.

  • Rene JotForm Support
    Replied on April 16, 2024 at 1:13 PM

    Hi Brad,

    Thanks again for the patience, we really appreciate it. To answer your first question, The Random Value Generator widgets added to the demo form was set to 5 as an example. If you continue to use the form and decide to add more quantities on the dropdown for additional tickets, then you have to add more of the widgets. That means, if the maximum number to the dropdown is 20, then there should be 20 Random Value Generator widgets in the form. I suggest not doing that because it has a lot of fields, and may cause your form to slow down and malfunction.

    Regarding the second query, an estimated 3,628,800 variations can be made for it because the widget mentioned above has 10 characters set. This indicates that for the numbers to repeat, that specific amount is required. For more combinations, you can limit this to a maximum of 32 characters. One way of preventing this is the widget's capability to check for the uniqueness of the combination, which should be set to YES, so not 1 entry will be repeated. See the screencast below:

    How to create a Raffle Ticket form Image 1 Screenshot 40

    Before we proceed with your request, please note that each field will be indicated as a column in Tables, even if the entries will be integrated to a Google Spreadsheet, as I have mentioned on my first response. You still need to copy and paste the ticket numbers so they can be aligned per line item or row, so your specific approach can be met.

    With that, and based on the details you have indicated, here's a workaround you can try. You can replace the Dropdown field with a Number field, so form users can just type in the amount of tickets they want to purchase. Along with it is a single Random Value Generator widget to generate a ticket number for the submission. We'll only use one widget for this so that the line item approach can be achieved. If the same for user wishes to have more ticket numbers, they have to submit another entry. See the screenshot below:

    How to create a Raffle Ticket form Image 2 Screenshot 51

    As you can see, form user John Doe submitted 3 entries with different ticket amounts to have 3 tickets numbers. This might be a bit tedious for form users, but the line item approach can be achieved accordingly if applied. Here's how it will look like in an Excel file once downloaded:

    How to create a Raffle Ticket form Image 3 Screenshot 62

    So, if line item 3 is picked, the submitter will be chosen as the winner. But if you still want to have multiple tickets submission so that more tickets can be picked from with fewer submissions received, then the original suggestion will definitely work.

    Let us know if you have any other questions.

  • Brad_Grier
    Replied on April 19, 2024 at 12:15 PM

    I have come to the conclusion that the last step of the raffle process will probably be a manual one where I will need to set up the line items according to how many tickets are purchased (unless I can find a xls formula to do it for me), but I switched things a little and came up with this form: https://form.jotform.com/241088654270155

    For the product I have set an inventory of 1000 tickets. How can I show the number of tickets purchased? Ideally with a progress bar or at least with xxx/1000 Tickets Sold.

    Again, thanks for your help.

  • Gian_D JotForm Support
    Replied on April 19, 2024 at 12:19 PM

    Hi Brad,

    Thanks for getting back to us. I understand the issue, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.

    We appreciate your patience while we work on a solution.

  • Gian_D JotForm Support
    Replied on April 19, 2024 at 12:50 PM

    Hi Brad,

    Thanks for your patience and understanding, we appreciate it. I’m sorry you're having difficulties with this. You can use the Submissions Counter widget to display the number of tickets sold on your form. Let me show you how to do it:

    1. In Form Builder, click on Add Form Element on the left side of the page, and click on the Widgets tab.
    2. Search for Submissions Counter, and drag, and drop Submissions Counter on your form.

    How to create a Raffle Ticket form Image 1 Screenshot 30

    3. Click on the Wand icon of your Submissions Counter, and enter the total number of your tickets in the Text After field.

    How to create a Raffle Ticket form Image 2 Screenshot 41

    That's it. Let us know if you have any other questions.

  • Brad_Grier
    Replied on April 19, 2024 at 1:54 PM

    And this will track form submissions or items sold? Because they could be different and I'm looking to track items sold.

  • Ylli JotForm Support
    Replied on April 19, 2024 at 2:11 PM

    Hello Brad,

    Thanks for getting back to us. The Submissions Counter Widget is going to track the number of form submissions received. It counts each time a user successfully submits the form. You can try using the Inventory Widget which allows you to track the remaining quantity of your items that are getting sold.

    Give it a try and let us know how it goes.


  • Brad_Grier
    Replied on April 19, 2024 at 4:32 PM

    So are you saying I should use the inventory widget for sales instead of the product widget that I am currently using? Is that correct?

    If that is the case how do I set that up with the payment processor (we are going to use Stripe)?How to create a Raffle Ticket form Image 1 Screenshot 20

  • Rhina JotForm Support
    Replied on April 19, 2024 at 5:07 PM

    Hi Brad,

    Thanks for getting back to us. I need a bit more time to check on this. I'll get back to you as soon as possible.

  • Brad_Grier
    Replied on April 19, 2024 at 9:26 PM

    Never mind - I was able to figure this part out - thanks.

    Here is the final: https://form.jotform.com/241098403475155

  • Rhina JotForm Support
    Replied on April 19, 2024 at 9:41 PM

    Hi Brad,

    Thanks for getting back to us. You can use the Form calculation widget to do your calculation amount from the Inventory widget. Let me show you how:

    1. Open the Add Form Element menu again, and Under the Widgets tab, add the Form Calculation widget.
    2. Select the Inventory field and add * then the value for your product.

    See example below:

    How to create a Raffle Ticket form Image 1 Screenshot 40

    You can check out the sample form here. After setting up your computation. You can use the User defined amount as your Payment type.

    How to create a Raffle Ticket form Image 2 Screenshot 51

    Note that this option will remove the listed products. You can then select to Get the Price from the Form calculation widget.

    How to create a Raffle Ticket form Image 3 Screenshot 62

    You can also check out the guide here on how to pass the calculation from the Form calculation widget.

    Give it a try and let us know how it goes.

  • Brad_Grier
    Replied on April 20, 2024 at 1:46 PM

    Yep - that is exactly what I did - thanks!

 
Your Answer