Mohit Kanwar Mohit Kanwar - 4 months ago 5
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.

<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: