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

    Address Field: How to make spefeic line optional within the field but require the field. AND how to validate zip code to 5 numbers

    Asked by KeyshaunSmith on February 23, 2016 at 07:38 PM

    In the address field question I would like the ability to require that the question be complete, but make the street address line 2 field optional for people who may have apartments. If they do not live in an apartment the street address line 2 field is not needed for a complete address. 

     

    I would also like to know how I can add validation to limit the Zip Code box to 5 numerical characters. 

     

    Thanks! 

    address field validate zip code and
  • Profile Image
    JotForm Support

    Answered by BJoanna on February 24, 2016 at 04:57 AM

    If you set address field to be required, then user will need to enter data inside of all fields. Also it is not possible to limit Zip Code box inside of address filed to 5 numerical characters.

    I would suggest you to create all fields from Address field separately. 

    This way you can make all fields to be required, except street address line 2 field. And you can also set zip code field to be numerical and set Max Size to 5 characters. 

    For country field, you can use Address field and hide all fields except Country field.

     

    You can also shrink fields if you want to have two field in the same row. 

    http://www.jotform.com/help/90-Form-Field-Positioning 

    http://www.jotform.com/help/328-How-to-Position-Fields-in-JotForm 

    Here is my demo form: https://form.jotform.com/60542016913953 

    Feel free to clone it

    Hope this will help. Let us know if you need further assistance.