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

  • hrwellness.dept
    Asked on June 1, 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. 


  • roneet
    Replied on June 1, 2020 at 1: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.



  • hrwellness.dept
    Replied on June 2, 2020 at 2: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. 

  • Eduardo_H
    Replied on June 2, 2020 at 5: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) Screenshot 10


  • hrwellness.dept
    Replied on June 3, 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. 

  • roneet
    Replied on June 3, 2020 at 1:53 PM

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

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

    Let us know how it goes.

    Thanks.

  • hrwellness.dept
    Replied on June 3, 2020 at 2:01 PM

    This worked! Thank you so much!!!!