1

I have simple search input which appears after auth, but chrome tries to fill it with username.

enter image description here

<input type="hidden" class="hidden" name="username">
<input type="search" class="form-control" id="input-search" placeholder="@lang('search.search_site')" value="{{ request()->get('search', '') }}" autocomplete="none" name="search-input">

Tried different things bu still it suggests username here. I think because its first input on page....

P.S. Tried autocomplete:off,no,none

Community
  • 1
  • 1
Kin
  • 4,466
  • 13
  • 54
  • 106

3 Answers3

0

This was driving me a little crazy also. Got round it like this.

<input type="number" id="your-id" class="form-control text-center border-success" 
placeholder="Enter desired code" />

$(function() {
        $('#your-id').attr("type","text");
});

HTH :)

0

The only thing that is working for me is to set autocomplete attribute value to new-password:

<input placeholder="placeholder text" value="" autocomplete="new-password"/>
-1
Add autocomplete="off" onto <form> element;
Add hidden <input> with autocomplete="false" as a first children element of the form.

Try this:

<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">

You can also create a couple of fields and make them hidden with "display:none"

<input style="display:none" type="text" name="user_name"/>
Prathamesh Doke
  • 797
  • 2
  • 16
  • 38