When creating address forms, it is a common practice to provide autocomplete functionality for city and street names loaded from some external API. How to best combine this with built-in browser autocomplete="on"?

What I find on the internet forms mostly is just turning the functionality off, let's take gumtree.com website for an example:

enter image description here

I personally think it is an antipattern, as a user with his autocompletes settings set up to some extent - all rental, work, and home addresses added & used whenever possible.

What I think is a solution (didn't check if that actually works yet, it's just planning phase):

  • custom autocomplete API call starts at 3 characters (city / street)
  • focus on an empty input - browser autocomplete is on
  • starts typing and reaches 3 characters - browser autocomplete turns off and is replaced by the custom one

What do you think of my approach? Do you have anything better in mind? Do you know any website where these functionalities are neatly combined?

  • What are you trying to achieve? Commented Jan 14, 2019 at 10:46
  • @DarrylGodden The normal browser autocomplete gives you the option to fill in some data that you've previously entered in a similar input field. The external API is for suggestions such as an address, as we know it from Google Maps. Now he wants to combine the suggestions based on previous input and those based on the current textfield input. (As far as I understand it)
    – Big_Chair
    Commented Jan 14, 2019 at 14:59
  • Hi, no I understand the technicalities of it, I'm trying to understand what you want to achieve for your users? Commented Jan 14, 2019 at 15:19

1 Answer 1


It depends on your form and its purpose. For a case like gumtree, autocomplete may be an interesting proposition. For a real estate listing or travel website, less so, as people may be looking elsewhere.

You want to give your user heuristic shortcuts that they will likely want. In a case like retail, your current location and previous history are good predictors. Other values in autocomplete (e.g. work address, parents' home) may lead you astray.

Technically speaking I see a few other possible solutions than autocomplete that you can consider, namely geolocation and search history (for returning users).

You can even blend these two and incorporate them into an algorithm that autocomplete wouldn't allow:

  • If I type "L" and I used "Liverpool" previously, it could automatically provide that as a first option;
  • If I type "Lo" and I'm in currently in Northern Ireland, "Londonderry" could appear before "London".
  • Reading up on the Wikipedia article on "Derry", my second suggestion may inadvertently be politically charged. I simply gave that as an illustrative example of the tool's behaviour. Please don't read more into that. Commented Jan 14, 2019 at 13:26

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.