Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

autocomplete not working on Chrome [closed]

I have a problem on our website where Chrome autocomplete seems not to work. It has been working in the past, but not consistently.

For example, I have an input field like this:

<input type="text" class="gwt-TextBox Inputfield TextInputfield form-control" maxlength="40" name="name" autocomplete="name" width="0" style="max-width: 26em; width: 100%;">

When I start entering my name, the autocomplete drop-down will open as expected, but when I select my name in the autocomplete drop-down, nothing happens but the drop-down closes.

Screensnip of the issue

No exception is logged in the console.

The page with the fields is here.

like image 563
Anders K Avatar asked Nov 27 '22 20:11

Anders K


1 Answers

Stumbled upon this answer in early 2021. My issue was that autocomplete was not triggering on certain fields. Adding an id attribute to the field solved my issue, so chaning

<input type="text" name="my_field_name" /> (not working) 

to

<input type="text"  name="my_field_name" id="my_unique_id" /> (working)

started remembering the previously submitted value.

like image 155
rnli Avatar answered Dec 10 '22 03:12

rnli