3

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 : mohitkanwar.com

enter image description here

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

Mohit Kanwar
  • 2,962
  • 7
  • 39
  • 59

2 Answers2

3
<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: https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

MattDiMu
  • 4,873
  • 1
  • 19
  • 29
0

Use the autocomplete attribute, see http://www.w3schools.com/tags/att_input_autocomplete.asp for details.

resamsel
  • 225
  • 5
  • 10