Can I auto-generate up to 10 random 3 digit numbers to sender after form is submitted?

  • GaConcrete
    Asked on December 16, 2016 at 7:08 PM

    I am creating a form for a raffle contest and I need a 3 digit random number to be generated after an individual submits a form that is sent to them via email or on the "Thank You" page. They may purchase up to 10 tickets, so based on the number of tickets purchased, they need that many "ticket" numbers generated. The numbers cannot be duplicated, all must be original. Is there a way to accomplish this?

  • Ashwin JotForm Support
    Replied on December 17, 2016 at 7:18 AM

    Hello GaConcrete,

    Yes it is possible to achieve your requirement by taking advantage of our "Random Value Generator" widget. It will allow you to set the character length of the code which you want to be generated.

    Do try it out and get back to us if you have any questions.

    Thank you!

  • GaConcrete
    Replied on December 18, 2016 at 11:05 AM

    Hello,

    I understand how to generate one ticket number, but is there a way to set it up so that when the user selects the number of tickets, that number of ticket IDs can be sent to them?

     

    Can I auto generate up to 10 random 3 digit numbers to sender after form is submitted? Image 1 Screenshot 20

  • GaConcrete
    Replied on December 18, 2016 at 1:01 PM

    Do random generator widgets check for uniqueness independent of other number generator widgets within the form? E.g. if there are two random number generators on the page, can both potentially generate the same random number within a given range?

     

    Thanks

  • jonathan
    Replied on December 18, 2016 at 5:02 PM

    Do random generator widgets check for uniqueness independent of other number generator widgets within the form?

    No. The random generated number is base on a different computation. 

    E.g. if there are two random number generators on the page, can both potentially generate the same random number within a given range?

    As far as I know the possibility of exact same random generated value is not like to happen. You can increase the randomness by increasing also the number of characters.

    Hope this help. Let us know if you need further assistance.

     

  • GaConcrete
    Replied on December 19, 2016 at 12:29 PM

    I need a solution that will allow me to generate between one and ten random 3 digit numbers per form submission (we are going to receive around 200 submissions). Every number that is generated needs to be unique. No two users can receive the same number. Do you know of a possible solution for this?

  • Ashwin JotForm Support
    Replied on December 19, 2016 at 12:54 PM

    Hello GaConcrete,

    I believe "Random Value Generator" widget can check for uniqueness and should fit into your requirement. I will work on your cloned form and get back to you soon.

    Thank you!

  • GaConcrete
    Replied on December 19, 2016 at 2:02 PM

    https://www.jotform.com/?formID=63535332383960

     

    This is the form that I am working with. Thank you! 

  • GaConcrete
    Replied on December 19, 2016 at 2:58 PM

    Update: I put 10 random number generator widgets on my form which are conditioned to display based on how many raffle tickets are purchased. The numbers are unique within one submission, however the number generated on widget #2 can still be generated by widget #1 on other submission. 

  • David JotForm Support
    Replied on December 19, 2016 at 4:18 PM

    The limitation is going to be between widgets.  Since the widgets can only check for unique values from submissions for that widget and not others, it would not be possible to have 10 in a single form and be 100% certain they will all be unique using only 3 digits.  The only way to do this would be to have a single field and if users wish to purchase more then one ticket, they would need to submit the form multiple times.