Is it possible to have a random ticket number generated?

  • RIde2
    Asked on December 4, 2017 at 2:32 PM

    I want to be able to sell raffle tickets online.  We are selling tickets individually for $25 and a book of 5 tickets for $100. There is no limit to how many individual tickets or books of tickets someone can buy. The ticket numbers can be random or they can be a series based on the number of tickets purchased. (i.e. 7 tickets could have unique numbers or can be a series such as 1001 - 1008).  it is only necessary that each number be unique.  we want the purchase price to be sold through PayPal.

    is there a way to generate these unique numbers under the conditions defined, and if so how do I do this? (I am aware of the Random Number Generator Widget but not how to use it in this scinareo.

  • Kevin Support Team Lead
    Replied on December 4, 2017 at 5:20 PM

    I think this may be achieved using any of the following widgets: 

    1. Unique ID widget: https://widgets.jotform.com/widget/autoincrement 

    This guide will help you setting up the widget: https://www.jotform.com/help/79-How-to-Add-Custom-Unique-IDs-to-your-Form-Submissions 

    However, the numbers will not be shown on the form, but they can be included on emails. 

    2. The random value generator widget: https://widgets.jotform.com/app/random_value_generator 

    This will generate random values based on letter and numbers, check uniqueness and it will be displayed on the form. 

    Now, no matter which widget you decide to use, you will need to add the necessary number to your form, for example, if your users can purchase up to 5 tickets then you will need to add 5 widgets that will be conditionally shown based on the quantity the user enters. 

    Now once you have set up that you will be able to perform the needed calculations, but since the pricing will change I would recommend you to use conditions to calculate the amount, this way if they purchase 5 tickets you will be able subtract the desired amount or percentage. 

    This guide will help you performing the calculations based on conditions: https://www.jotform.com/help/268-How-to-Insert-Text-or-Calculation-into-a-Field-Using-Conditional-Logic 

    This guide will help you passing the calculated amount to the payment field: https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field 

    And this guide will provide you with more info about the show/hide fields conditions: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer 

    I hope this information helps.