I have a web application where the user will need to fill many addresses (a few users entering the addresses of other people). It uses autocomplete to speed things up and to reduce duplication (the database contains nearly all streets in the city). Most often than not, the street the user is entering will already exist, but in the rare cases it doesn't the user can just type it regularly and the back end will create it anew.
I'm using a separate input
field for each address part (enter
or tab
- and sometimes space
- moves to the next), since even if the street is not known maybe the neighborhood is, and failing that the city will probably be, etc. I expect in the "common case" the user will type about 5 characters total and everything else (street, neighborhood, city, state, country, postal code) will get autofilled for him, so he can proceed to the number and complement (which will be different each time).
My problem is that, in my country, the "natural" order for addresses is:
St. Foo 123/456 ...
instead of:
Foo St. 123/456 ...
How should I set up the order of fields? I've seen in another question that it's not a good idea to change the display order, but if I keep the "type" (street, avenue, etc) first the user will waste time typing it all the time - when the "street" field could autofill it for him. However, when entering an unknown address, that field will have to be typed (so it can be correctly saved in the database), so he'd need to go back to it.
I thought about a few possibilities (with varying degrees of diffulty to implement), and I'd like some feedback on which would be best usability-wise:
- The "street" field starts focused; if the user selects something in the drop down then the "street number" is focused ("type" is autofilled); if he tries to move to the next field instead (new street will be created) then the focus moves back to "type" instead of forward to "number".
- ...and when moving away from "type" it skips "street" and goes to "number"; or:
- ...and when moving away from "type" it returns to "street", and the next time he moves away it goes to "number".
- The "street" field starts focused, and the focus cycle normally; if the user is entering a new street, the "type" field gets a red border, and the user decides when and how he'll go back to fill it.
- I use a single field for "type" and "street", and try to perfect my autocomplete to account for the several combinations the user might type ("Av Foo", "Av. Foo", "Avenida Foo", "A. Foo", "Foo").
Any other suggestion is also welcome.