title: Chrome's "save password" functionality places a username in an unrelated field
body: <p>I have a web application written in HTML/PHP with a login screen. If a Chrome user  logs in and navigates to a home page, the browser gives them the option of saving the password:</p>
  
  <p><a href="https://i.stack.imgur.com/kwv3j.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kwv3j.png" alt="enter image description here"></a></p>
  
  <p>Some of our users who have hit 'save' will then see their username appear in a field that bears no relation to the login functionality:</p>
  
  <p><a href="https://i.stack.imgur.com/EonPe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EonPe.png" alt="enter image description here"></a></p>
  
  <p>The input field should look like this. With no value whatsoever:</p>
  
  <p><a href="https://i.stack.imgur.com/4jzmJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4jzmJ.png" alt="enter image description here"></a></p>
  
  <p>This is the code for the input field:</p>
  
  <pre><code>&lt;input type="text" id="searchInput" autocomplete="disabled" placeholder="Search..." &gt; 
  </code></pre>
  
  <p>And as per other questions, i have tried every single possible solution to disable any sort of auto-fill of this field via the autocomplete attribute but no luck.. </p>
  
  <p>Also, solutions like creating fake hidden fields didnt work either (this apparently used to work but Google discovered this practice and worked around it) </p>
  
  <p>How can i stop Chrome from doing this?</p>
  
  <p>Edit:
  I have been able to get around this issue by setting the field initially to read only:</p>
  
  <pre><code>&lt;input type="text" id="searchInput" onfocus="this.removeAttribute('readonly');" readonly autocomplete="disabled" placeholder="Search..."&gt;
  </code></pre>
  
  <p>In reality i shouldn't have to do this for every single field. But according to <a href="https://stackoverflow.com/questions/15738259/disabling-chrome-autofill?page=3&amp;tab=oldest#answer-50621749">this</a>, Google Chrome doesnt so much care about the usability of complex web interfaces likes those of CRM systems:</p>
  
  <blockquote>
    <p>The tricky part here is that somewhere along the journey of the web autocomplete=off become a default for many form fields, without any real thought being given as to whether or not that was good for users. This doesn't mean there aren't very valid cases where you don't want the browser autofilling data (e.g. on CRM systems), but by and large, we see those as the minority cases. And as a result, we started ignoring autocomplete=off for Chrome Autofill data.</p>
  </blockquote>
  
  <p>So those of us  who happen to be working on "minority cases", are we doomed to have to write hacks like the above to prevent Chrome from inserting the username in a random place? </p>