6

I want to disable the suggestions for previously entered texts on a <input type="text" list="stuff"> which provides a drop down list to choose from via a <datalist>.

This behaviour causes some entries to be shown twice and sometimes problems occur when selecting them.

I tried <input type="text" autocomplete="off"> - in Firefox it works just like I want it to but Chrome disables the suggestions from the <datalist> as well.

I would be happy for any solution at all even if it involves JavaScript, thanks.

Bryan Ash
  • 4,385
  • 3
  • 41
  • 57
JohnZoidberg
  • 97
  • 2
  • 8
  • 1
    Possible duplicate of [Is there a W3C valid way to disable autocomplete in a HTML form?](http://stackoverflow.com/questions/582244/is-there-a-w3c-valid-way-to-disable-autocomplete-in-a-html-form) – Spencer Wieczorek Jul 08 '16 at 23:40
  • @SpencerWieczorek this is definitely not a duplicate. – MMAdams Dec 21 '16 at 19:08

1 Answers1

1

Add autocomplete="off" onto element; Add hidden with autocomplete="false" as a first children element of the form.

Rakibul
  • 21
  • 2