Can I remove the Area Code section of the Phone Field?

  • rbell1
    Asked on September 27, 2017 at 4:58 PM

    Hi, I am wondering how we can remove the area code field for the phone number.  I do not want to use input mask function as our phone numbers range from 8-10 digits in length.  For example we need to be able to enter the following field lengths: 12345678, 1234567890.

    Thanks


    Can I remove the Area Code section of the Phone Field? Image 1 Screenshot 20

    Jotform Thread 1259657 Screenshot
  • Support_Management Jotform Support
    Replied on September 27, 2017 at 5:36 PM

    Hi @rbell1 - I'm afraid the only way to meet your requirement of removing the Area Code and at the same time, without using Input Mask, is to use either a Short Text Entry (Textbox) field or a Number field instead.

    Textboxes have a Numeric Validation that will only allow users to input numbers in it.

    Can I remove the Area Code section of the Phone Field? Image 1 Screenshot 30

    While the Number Field already has this validation in place by default. One good point about using the Number Field is that it has a LIMIT ENTRY option. If the format you're expecting is between 8 and 10 numbers, then you can set the MINIMUM and MAXIMUM limits respectively.

    Can I remove the Area Code section of the Phone Field? Image 2 Screenshot 41

    It's also worth mentioning that you can keep using the Phone Field if that's what you want to use but you'd have to set the field as NOT REQUIRED. Afterwards, we can use CSS to hide the AREA CODE section of the field.

    Weigh your options based on the suggestions above and if you would like to go with the CSS approach, kindly share your Form ID/URL so we can provide you the codes you need.