There is a form with following fields in following order:

Zip City State Phone

When user enter zip code fields city and state got auto populated based on zip code user entered.

The question is it a good idea to move field focus from zip to phone field after autocomplete happened or no? Basically user enter zip code, next fields got autopopulated and the focus already on phone field. So less actions from user.

Is there any examples how similar functionality done in other websites?

  • Lots of other examples exist. Most common scheme seems to be enter zip code, then populate City/State automagically, where City/State are read-only fields. In UK, we use postcode and house name/number, from which complete address can be deduced. Only enable City/State fields for edit, if the Zip Code is ambiguous. Commented Jun 2, 2018 at 16:16
  • @SteveJones the question is about should i change input focus from zip code field to phone field automatically or not, and why :)
    – Aldarund
    Commented Jun 2, 2018 at 16:35
  • Yes, that's what I answered, by referring to the numerous other cases that exist. This is a solved problem and has been for a long time. Commented Jun 2, 2018 at 16:38
  • @SteveJones i dont see anything about moving input focus in your answer...
    – Aldarund
    Commented Jun 2, 2018 at 16:40
  • If you read what I said, it is obvious that after the Zip Code you go to the phone number, as the City & State fields are read-only. I wouldn't recommend moving focus automatically, as that is annoying. So, just two fields to edit: Zip Code & Phone, in addition to two read-only fields for City & State which can be deduced once you have a valid Zip Code. Commented Jun 2, 2018 at 16:43

1 Answer 1


Moving focus automatically is not a good idea. User may have done a mistake (e.g. swapped two digits by mistake, 37 instead of 73) and wants to modify it. When focus is automatically moved, user will press a couple of keys (like "Backspace", "7", "3" to change 37 to 73). But if the focus is in another field, it has two problems: this may initiate validation in another field (which will be misleading) and user will be irritated, because he has to switch focus back. He will loose time.

You can prefill in the next fields whatever you want, but it is better to keep the focus in the current field, not move it automatically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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