How to apply a characters limit to form fields such as address and phone number fields?

  • davidwerner
    Asked on October 20, 2016 at 2:04 PM

    I don't see any way to put format restrictions on the off the shelf Address and Phone Number inputs. i.e. I can enter as many numeric characters as I want for Zip Code, same with Phone Number, etc. I'm assuming this has something to do with ensuring it's flexible for internationalization but I would have also assumed that you could set format requirements on the fields themselves (as you can do with say the Text input). Is there no way to do this? If not, does everyone just run the risk of getting garbage address and phone data? 

  • Kevin Support Team Lead
    Replied on October 20, 2016 at 5:07 PM

    In the address field you cannot set a characters limit, your users are free to enter the needed number of characters, if you would like to limit the number of characters for an specific field in the address field, you would need to switch to use Text Boxes, this way you can set up separated limits or masks to each field: 

    How to apply a characters limit to form fields such as address and phone number fields?  Image 1 Screenshot 30

    Regarding to the Phone Number field, you can only set up a mask that will limit the entry the number of characters you have allowed in the mask: 

    How to apply a characters limit to form fields such as address and phone number fields?  Image 2 Screenshot 41

    I would also recommend you to check on our widgets since we have some that will help you to avoid people to enter incorrect information and you may even validate the phone number field entered as well as get the correct address.

    Here are the widgets that will help you with the address:

    https://www.jotform.com/widgets/autocompleted-address

    https://www.jotform.com/widgets/address-map-locator

    https://www.jotform.com/widgets/show-map-location

    These widgets will help you to format the phone number entered:

    https://www.jotform.com/widgets/phone-picker

    https://www.jotform.com/widgets/country-code

    And this one will help specially to validate the phone number via a SMS:

    https://www.jotform.com/widgets/sms-confirmation

    This guide will help you to add a widget to your form:

    How-to-Add-a-Widget-to-your-Form

    Hope this helps.