Mohit Kanwar Mohit Kanwar - 1 year ago 88
CSS Question

How do I stop browsers for suggesting inputs for fields?

I have an input text field, when user enters any alphabet/word, I have to suggest relevant topics.

The problem here is, the browser is also doing the same thing. It is showing previously entered data, which overrides the information shown in the site.

PFB the image, the circled black d, is a suggestion by browser (firefox in this case) and below list, (Git-Commands, Equals Method etc) is shown by me.

I want browsers to stop showing suggestions for this particular field.

How to do that?
The site is build in simple HTML and JavaScript.
Reference The searchbox on homepage on :

enter image description here

PS: I have tried using autocomplete="off" . It does not work here, as it is not autocomplete, it is suggesting.

Answer Source
<input autocomplete="off">

Should do it. It will NOT work on login-fields, however, as most Browser vendors decided to ignore the setting there. Further Information:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download