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

    Optional characters in Input Mask.

    Asked by marcrobson on August 15, 2016 at 06:00 PM

    I have an input mask for a 16 character field.  However there are valid cases with only 15 characters.  I already have plenty of 'back-end' logic on the spreadsheet that this form gets dumped into so I do not want to split the field into two.

    Is there any way to use the mask but indicate that a character is optional?

    Something like:

    #### #### #### ###?

     

    Obviously some of the examples provided by jotform make no sense (asking for a street address and requiring 4 characters for the street number (PLENTY of street address have more or fewer characters).  So there must be a solution

    input mask mask in JotForm solution and
  • Profile Image
    JotForm Support

    Answered by Chriistian on August 15, 2016 at 10:11 PM

    Are you referring to the input mask on the credit card number field? I would like to inform you that collecting credit card information using plain text fields is a violation of Jotform's terms.

    Please remove these fields from your form, otherwise, the account will be autosuspended by our phishing detector and the forms will be disabled. If you want to collect credit card information without charging it, you will need to use on of the payment integrations available in Jotform such as Paypal or Stripe. Here's a guide on How to Enable Payment Authorization.

    As for your question regarding masked inputs, unfortunately it is not possible to have an optional character. The input mask is made to restrict the input to the specified characters, so you cannot have one character optional when using input mask. A possible workaround would be to have two fields, one with 15 characters and one with 16, then use Show/Hide conditions to show one of the fields based on the user's previous input.

    If you need further assistance, please let us know.
    Regards.