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

    How to use Input Mask to restrict a 10-digit phone number?

    Asked by jrobgk1 on June 22, 2017 at 06:01 PM

    We have a phone number field, and don't want people to be able to only enter 7 or 8 digits instead of 10. Can we trap for that before submission to our system?


  • Profile Image
    JotForm Support

    Answered by Jim_R on June 22, 2017 at 06:53 PM

    Hey Jesse, you may use Input Masks to achieve this.

    @ = Masks Letters

    # = Masks Numbers

    * = Masks Letters & Numbers

    Since you're asking for a 10-digit phone number, use a Short Text Entry (Textbox) field and set its Input Mask like this: ##########

    Complete guide: Getting-Started-with-the-Basics-of-Input-Masking 

    (On the guide above, scroll down to Scenario #2 for a couple of examples with phone numbers)