What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How to create conditions around a promo code field?

    Asked by ryanmouttet on January 16, 2017 at 09:23 AM

    can i cross reference a field ? For say a promo code

    Just one single code

  • Profile Image
    JotForm Support

    Answered by Helen on January 16, 2017 at 10:25 AM

    Hi,

    Thank you for contacting us.

    Sorry, I could not understand your question clearly. What is "cross field reference" ?

    Did you want to pass a value to another field? If you want to do this, you can use our "Update/Calculate Field". Here is a guide helps to you: https://www.jotform.com/help/286-How-to-Pass-Field-Value-to-Another-Field

    If your problem is not about passing value, please provide us more detail about your issue. 

    We will glad to solve your problem and be waiting for your response.

    Thanks, 

  • Profile Image

    Answered by ryanmouttet on January 16, 2017 at 10:35 AM

    Hi Just a field where I can put in one simple "promo code" and it the user registrant/dosnt match it it will create a incorrect note. If the do match it, it will create a Tick box at the end as an example. The field can also be left blank if they do not know the "promo code".

  • Profile Image
    JotForm Support

    Answered by AIDAN on January 16, 2017 at 12:26 PM

    Hi,

    What you requested is easily achievable using our conditional logic features.

    We have a detailed guide on how to create smart forms using conditional logic here: https://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic

    After reading our guide, to get an overview on what you can do with conditional logic features, you will start to grasp the suggestion that I will present to you in these steps, for your specific case:

    I understand that you would like to have an optional promo code box, and if it contains the correct code, you would show a checkbox.

    This, in conditional logic thinking, means:

    1. We create a text box to receive the promo codes:

    2. We create a checkbox and we hide it because it needs to be shown only when the correct code is entered in the text box above:

    3. We create a condition so that, if the text box has the correct promo code, we would show that hidden checkbox:

     

    Here is the result of the steps we did above:

     

    I have also created a demonstration form, in case you would like to clone ithttps://form.jotform.com/70154354122950

    If you have more questions or need further assistance, please let us know. Thank you.

  • Profile Image

    Answered by ryanmouttet on January 16, 2017 at 02:45 PM
    Thanks Aidan, while that is all good if someone puts in wrong "Promo code" they can still register without them not knowing the code they put in is incorrect. Having said that i dont want to hide my "Register" button. So im thinking that the next best option is using "input mask". Thoughts?
    ________________________________
    ...
  • Profile Image
    JotForm Support

    Answered by AIDAN on January 16, 2017 at 04:51 PM

    Hi,

    I would suggest creating an error text that shows when someone fills the promo code box, and the value doesn't match the correct promo code.

    I have modified my demonstration form by adding the condition I suggested above. What I did was adding a Text element, and typing inside it an error, and coloring it red, then setting up a condition that goes like this:

    If the promo code box is filled and if the value is not equal to "aidan" then show the error text.

    Here is the link to my form, just in case: https://form.jotform.com/70154354122950

    Here is also an animation of how the form behaves now:

    If you need further assistance please let us know. We will be happy to help. Thank you.

  • Profile Image

    Answered by ryanmouttet on January 16, 2017 at 05:19 PM

    I still need help creating a error text, but this is what im looking for. I need help adding a Text element, and typing inside it an error, and coloring it red, then setting up a condition like you did and im done. I cant seem to find this can you show steps thanks. 

  • Profile Image

    Answered by ryanmouttet on January 16, 2017 at 05:45 PM
    Hi aidan what did you select to make it respond with "the promo code is incorrect" im not getting that to work.
    ________________________________
    ...
  • Profile Image

    Answered by ryanmouttet on January 16, 2017 at 05:45 PM
    where do i select to show error text
    ________________________________
    ...
  • Profile Image
    JotForm Support

    Answered by AIDAN on January 16, 2017 at 06:09 PM

    Hi,

    I am glad this suggestion would work for you. Here is a step by step guide on how to achieve what I explained above:

    1. We create a Text element, double click on it (or click "Edit HTML"), type our warning, color it red and click "Complete":

    2. We set this Text element that we just created, as hidden, because we will be showing it conditionally:

    3. We then set up the additional condition that I mentioned above, so that if the promo code box is filled and if the value is not equal to our correct value, and if so, we show the error. This means we will be having two conditions, and if all of them are correct, we proceed with showing the error:

     

    Finally, here is a reminder about my demonstration form that you can simply clone and examine: https://form.jotform.com/70154354122950

    If you need further assistance please let us know. Thank you.

  • Profile Image

    Answered by ryanmouttet on January 23, 2017 at 02:33 PM

    Hi Im getting there, but can I add a second promo code that will show as well that "the promo code is correct"? It seems to be conflicting with the promo code is "inorrect" field. 

  • Profile Image
    JotForm Support

    Answered by AIDAN on January 23, 2017 at 04:10 PM

    Hi,

    When setup correctly, it shouldn't be conflicting at all, because while both the correct and incorrect Text elements would be initially hidden, only one would be shown at any given time, based on conditions.

    The only difference between these two Text elements, is that one is shown when the user fills the field with correct code, and the other is shown when the user fills the field with incorrect code.

    Please change the condition of the success Text Element to match the following:

     

    Here is my corrected form in case you would like to clone it and examine the condition: https://form.jotform.com/70226225482956

    As usual, if you need further assistance please don't hesitate. We'll be happy to help. Thanks.