How do I add a mask to the Discount code field?

  • Profile Image
    hrwellness.dept
    Asked on June 01, 2020 at 11:31 AM

    Is there a way to set up a field to only accept a certain entry? We are setting up a discount code for a certain group, but right now, it accepts anything they enter. We have it set to be no more than 5 characters, but would like it to only accept a certain entry. If someone enters the incorrect code it would not accept and allow them to move forward with their registration. 


  • Profile Image
    roneet
    Answered on June 01, 2020 at 01:24 PM

    Could you please let us know the form in question?

    You may use the Short text entry field to enter the discount code and enable the mask to it so that the user needs to fill as per the mask you have enabled.

    Guide: https://www.jotform.com/help/381-Getting-Started-with-the-Basics-of-Input-Masking

    Let us know how it goes.

    Thanks.



  • Profile Image
    hrwellness.dept
    Answered on June 02, 2020 at 02:27 PM

    Thank you for sending these instructions - I was able to set up the input mask to limit to to ##@@@ (10off) - but it is allowing me to type in anything for the @@@ (I would like this to be letters only). Ideally, I would like the text box to only allow it to accept 10off as the entry. 

    The form I am referring to is the South Carolina State Park Passport Registration 2020. It is in the box that asks for 'Discount Code'. It is set to limit to 5 characters. 

  • Profile Image
    Eduardo_H
    Answered on June 02, 2020 at 05:04 PM

    it is allowing me to type in anything for the @@@ (I would like this to be letters only)

    Upon testing, I couldn't type anything but letters. Could you double-check that you can type other characters on the live form?

    Ideally, I would like the text box to only allow it to accept 10off as the entry.

    You can achieve that by using Conditional Logic rules. You should set your IF statement as follows:

    1591131673Screenshot(4).png


  • Profile Image
    hrwellness.dept
    Answered on June 03, 2020 at 11:31 AM

    I retested the form and setting it up as ##@@@ is only now allowing numbers and letters. I understand the conditioning rule, but getting stuck on what the second part would be in the logic to block them from moving forward. I want it to stay on that 'discount code' box until it is typed in exactly as 10off. 

  • Profile Image
    roneet
    Answered on June 03, 2020 at 01:53 PM

    You may set this condition and show the page break only when the discount is 10off:

    15912068061.PNG

    Let us know how it goes.

    Thanks.

  • Profile Image
    hrwellness.dept
    Answered on June 03, 2020 at 02:01 PM

    This worked! Thank you so much!!!!