How can I check for a predeterminded code match?

  • ultimatenortheast
    Asked on July 17, 2014 at 4:20 PM

    Suppose I want to put in a field where a user must put in a code they are given. If they don't match the codes I enter in the form (like 12345, or AC987, or something else) then the form won't be sent to me. I will obviously enter those codes somewhere while I create the form.

     

    Thanks for your help.

     

    Example below is called invite code (not sure what technology they use to create and validate the form.

  • David JotForm Support Manager
    Replied on July 17, 2014 at 7:57 PM

    In that case you could use conditional logic to show the submit button if the code entered matches. Once you create the form, you could add the Text Box field at the beginning of the form, so the whole form is displayed if the right code is entered, that can be accomplished following this guide "Hide or Show Multiple Fields at Once".

    Another alternative would be adding the Text Box field before the submit button:

    How can I check for a predeterminded code match? Image 1 Screenshot 30

    And setting the conditions this way:

    How can I check for a predeterminded code match? Image 2 Screenshot 41

    Please try my example form here, the code to be entered is "123", let us know if you have more questions, we will be glad to assist you.

  • Holidea
    Replied on June 10, 2016 at 5:45 AM

    Hi Support Team,

    is possible to input a sequence of codes to check?

    for example

    If Enter Code field is Equal to any number between 100 and 999

    then show Submit?

    Thank you !

  • Chriistian Jotform Support
    Replied on June 10, 2016 at 7:01 AM

    Hi,

    In that case, since your codes are numeric, you need to change your code field to Number field. You need to create a condition that will show allow submission only when code is greater than 99 AND lower than 1000. Please follow the steps below.

    How can I check for a predeterminded code match? Image 1 Screenshot 30

    How can I check for a predeterminded code match? Image 2 Screenshot 41

    I modified my colleagues form and modified it a bit. Please see it here https://form.jotform.com/61613435768966