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

    Short Text Entry: Variable-length text entry with input mask

    Asked by PAPDMP on July 20, 2017 at 10:11 AM

    Users must input a string that is either 8 or 9 characters long. Most only have an 8 character code. Others have a 9 character code. I use the input mask @@*#####* but this will generate an error for users entering a string that is 8 characters long. Is there a way to make the 9th character optional? If not, is there a way to suppress the error?

  • Profile Image
    JotForm Support

    Answered by Chriistian on July 20, 2017 at 01:18 PM

    Currently, it is not possible to have input masked while expecting variable-length. I am trying to come up with a workaround. I will be back as soon as possible.

  • Profile Image
    JotForm Support

    Answered by Chriistian on July 20, 2017 at 01:32 PM

    The only workaround is to ask your users first the number of digits they have and then show/hide either the 8-digit or 9-digit masked input based on that. Please see my test form https://form.jotformpro.com/72004736147957.

     

    I would escalate this to our developers to see if it is possible to have variable length text entry while applying an input mask.