How to apply input mask when the entry length is not fixed?

  • kfafhaat
    Asked on August 19, 2019 at 3:45 AM

    what if the entry length is not fixed? example 12AA12345678

    The last set of numbers' length is not fixed. it could be less or more? how to apply the mask here? Thanks!

  • AndrewHag
    Replied on August 19, 2019 at 5:54 AM

    Could you please provide more information on which field you wish to apply the mask? Also, please share the URL of the form that you are working on.

  • kfafhaat
    Replied on August 19, 2019 at 9:35 AM

    Im trying to make a field with a mask where entry must be like this...

    Examples:

    12AB12345678

    19CD8765


    First 2 chars - numbers

    3rd and 4th chars - alphabets

    Then all the next characters are numbers but the LENGTH is different from one another. Some has 4 digits some has more. Example given above are showing what i meant.


    I have no form url to share coz I didnt complete my form yet.

    Thanks!


  • Ivaylo JotForm Support
    Replied on August 19, 2019 at 11:21 AM

    Input mask is used when a specific format is required. Unfortunately, it is not possible to have a variable length of the numbers.

    You may consider to use our Masked Input widget, which may give you more flexibility. You can find here:

    https://widgets.jotform.com/widget/masked_input

    Let us know if you need any further assistance.

  • Ivaylo JotForm Support
    Replied on August 19, 2019 at 11:28 AM

    Can you please try to use the format below in the Input Mask field?

    ##@@[#][#][#][#][#][#][#][#][#][#]

    Please give it a try and let us know how it works for you.

    We will wait for your response.

  • lwh2
    Replied on August 23, 2019 at 1:22 AM

    I used the following for a phone number field and it worked:

     ###-###-#### [***. ][*][*][*][*][*][*]

    And I put this in the placeholder on the advanced tab of the field:

    Ex: 304-123-1234 Ext. 12 (enter numbers and letters only - Extensions are optional)

  • KrisLei Jotform Support
    Replied on August 23, 2019 at 3:10 AM

    Glad it worked. Is there anything else we could assist you with?

  • lwh2
    Replied on August 23, 2019 at 4:43 AM
    No thank you; and thank you for asking.
    Get Outlook for iOS
    ________________________________
    ...
  • kfafhaat
    Replied on August 25, 2019 at 7:25 AM

    IvayloK, your solution was a hit! Thank u! It did work!


    Thanks everyone for taking time! 


    Cheers,