3 ms·
Approach I have used for U.S. with some success... Objective: Deliver complete address with minimal keystrokes. Constraint: User can type whatever they want.
by edw519 17y ago
Approach I have used for U.S. with some success...
Objective: Deliver complete address with minimal keystrokes.
Constraint: User can type whatever they want.
Approach: One text box for address. Reevaluate with each new key entered. Use lots of indexed tables (zip codes, cities, states) for verification. Reformat when they leave the box. Provide help, autofill, undo, dropdowns, and error message feedback.
Some of the logic:
- 5 consecutive integers: verify zip code. Autofill city and state. If multiple cities, dropdown for choice.
- 2 alphas and a space: verify state.
- 3+ alphas: verify city. Dropdown for State.
You kinda get the idea. There's probably a lot more optimization that could be done. It's worth it because it's used in so many places.
- chime 17y agoDo you have a demo running anywhere?