Trying to generate and track a random number

  • ADaigger
    Asked on October 19, 2017 at 10:27 AM

    Good morning,


    I need a form meant to mock a scratch off where the person can win 10, 20, or 30% off based off of certain odds, and then on hitting submit a page shows up displaying their discount and promo code, and the results (including the discount they recieved) need to be visible to me per submission.


    To do this, I set up a random number generator to generate a number from 1-99. My first approach was doing a Conditional Thank You page, where "If random number is less than 20, show a page displaying 30% off" - 3 conditional statement with different thank you pages. I realized pretty quickly that this was not working, it would only show one of the pages, no matter what the random number was. (Are you allowed to have multiple "custom thank you" pages? If not this is probably why).


    I then tried to add a second field, "Discount" which was a blank number, and set up conditional statements "If random number is less than 20, discount value is 30" and so on. this was actually working, but when I tried to use the {discount} value on the thank you page, it wouldn't display. Also, I have an automatic email meant to be sent to myself to keep track of who got what discount, and this field appears blank in the emails. 


    Right now the functionality is to always display 20% off, as we needed to go live, but i'd like to fix it as it will be live for about a month. The link is a non-live clone of the forum, so I can play with it a bit. 

  • Chriistian Jotform Support
    Replied on October 19, 2017 at 12:44 PM

    I am currently checking your form. I will let you know when I find a solution.

  • Chriistian Jotform Support
    Replied on October 19, 2017 at 2:14 PM

    Please try changing your first 3 conditions to the ones below.

    15084368702017 10 20 0213 Screenshot 10


    Let us know how it goes.

  • ADaigger
    Replied on October 19, 2017 at 4:00 PM

    AWESOME this works for the randomization and displaying the correct message, and i'm getting good information about the results in the email back to me. Thank you!


  • ADaigger
    Replied on October 19, 2017 at 5:58 PM

    Hello,


    To update this, I've been getting responses on my live form (https://form.jotform.com/72836677029165), and it has not been coming through with the number, random number, and im sure about the functionality of the thank you pages. I've since deleted the non-live form above, but made sure to match it exactly.


    Anyone able to check out the live form (please note that this is being actively advertised to clients, so please try not to make any big changes that would impact it). 

  • John_Benson
    Replied on October 19, 2017 at 10:31 PM

    I am currently testing the form. I will contact you again on this thread once I have a solution.

    Thank you for your understanding.