Unqiue Code Validation

  • Profile Image
    Adam Hicks 
    Asked on March 11, 2015 at 10:14 PM

    Hi guys, looking into your site and want to see is jotform is able to do it. The forms I want to create are for Competitions.

    When people buy a product they receive a card with a unique code and get lead to a form to enter. On that form there will be a field called Unique Code.

    They will then enter the Unique code they received on the card.
    However what I need is for the form to Validate a database of over
    30,000 codes. Is there a way that this can be managed on your creator?

    From having a look I see that you can do this sort of thing via conditions - however I'm not sure how to implement it.

    Cheers, -A.

  • Profile Image
    Charlie
    Answered on March 12, 2015 at 03:44 AM

    Hi Adam,

    Unfortunately, I believe JotForm is not designed to have forms to handle those kind of list. If you add it to the "Conditions" you'll actually need to type or enter 30,000 codes in the setup, that would also cause the form to freeze and crash in the browser.

    For this kind of cases, this is what I could recommend.

    1. Create a form and redirect it to a PHP script to return a validation or verification for the form. Here's a guide on how to pass POST Data to PHP: http://www.jotform.com/help/213-Send-POST-Data-From-JotForm-Using-PHP-in-Custom-Thank-You-Page.

    2. Or you could also use the form's full source code and add a Javascript function or connect to a database to do the verification. Here's how to get the form's full source: http://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form.

    I hope this helps.

    Thank you.

     

  • Profile Image
    Adam Hicks 
    Answered on March 12, 2015 at 05:50 PM

    Thanks for that do you know of any PHP or Javascripts that would manage what I'm after?

     

    -A.

  • Profile Image
    BDAVID
    Answered on March 12, 2015 at 06:24 PM

    I think you should hire a PHP programmer in order to accomplish what you are looking for, to best optimize the database queries and PHP conditional sentences for the 30,000 codes that will be hosted in your database.