0

In my application, I have a web-form for creating a "New Company" object. Each Company has a name and an Address field.

The address field should (but not have to) be composed from these fields:
- Country
- State/Region
- ZipCode
- City
- Street
- Street number
- Any additional information may be included (entrance, floor, etc..)

My question what is the best practice for Address forms? Should each field be on his own line? or maybe some fields can share a line? Do I need to use "State" in my form, since many countries don't have states? Should I use drop-downs for some values or textboxs are a good solution? Should I add form validation? Any additional information, thoughts will be much appreciation.

  • what's been your best experience with these sorts of forms, in your web travels? – Confused Dec 2 '18 at 14:46
  • My experience was not so good when the Form limit my choices, for example setting a mandatory length of 6 to the zip-code - which not fit the roles of my country. Or setting the State value to be a mandatory field while in my country we don't have States. – Gil Epshtain Dec 2 '18 at 14:49
0

I will touch on a few of the issues here, though this is actually quite a big topic:

Field layout

One field per line is best for mobile. But if many users will be using a larger screen (desktop, laptop or a decent size tablet) then typically City, State and Zip Code can be placed on the same row.

Street, Street Number and (optionally) Apt./Suite #, are typically combined into one field. In the US and many other countries it is 123 Main Street, Apt. 3G*, but the sequence does vary in some countries. Unless you have a specific need, generally best to let the user enter it however they see fit. The one big use I know of for Street Number is for credit card validation, but the systems I have worked with can generally take the entire first line of the address and parse it themselves.

Country and Country-Specific Fields

Country should be a select/drop-down list. You can use the selection from this list to:

  • Provide a select/drop-down list of States/Provinces - or if you have a country where you don't know the States/Provinces, provide a text field instead.
  • Determine the need for and size of the Zip Code field, though you could simply use long-enough-for-everywhere text field instead.

Sequence

I generally start with 2 or 3 lines of general address, followed by city, since those fields will apply everywhere. Then I list the country because changing country will change the State/Province list. List are State/Province and Zip Code.

Other Stuff

  • There are different preferred mailing formats, so if you are actually physically mailing things on a regular basis then you should look into that. However, the typical pattern is most-specific at the top, least-specific (country) at the bottom.

  • If you know your most popular countries, make the most popular country (and the associated State/Province list) the default, and try to set up State/Province lists for the next several most popular countries. Of course, if this is a new system then you may not have any idea what the most popular countries will be, and you will never (practically speaking) be able to cover everything. If it is a US-centric (but not limited to US) site, States/Provinces for US, Canada, Mexico may be sufficient for 90% - 99% of your users.

0

Firstly, unless your users will always be entering US addresses, best practice is to use the following fields:

  • Address Line 1
  • Address Line 2
  • Address Line 3
  • Address Line 4
  • Country

This allows users with addresses in other countries to enter the information in relation to them and their format, not just in the US format.

Secondly, it is probably best to split them into seperate textboxes on new lines. Like this.

Hope this helps!

  • I didn't understand what information should the user enter in line1, line2, etc..? – Gil Epshtain Dec 2 '18 at 14:58
  • Look at this example letter as an example: ego4u.com/images/writing/cover-letter-06.png It shows a format of 5 lines, that's what the user would enter in each line on your form. – Jessica Ward Dec 2 '18 at 15:01
  • 1
    As an example, addresses in non-urban Costa Rica are often a physical description of the building location like "125 metres west of the building with the large green gate". This is one of the advantages of not assuming the nature of the information to be gathered on "line 1" – Dancrumb Jan 20 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.