Optional characters in Input Mask.

  • Profile Image
    marcrobson
    Asked 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

  • Profile Image
    Chriistian
    Answered 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.