javascript - Enable autocomplete for only password forms in Google Chrome -


let's have login form this:

 <form>    <input type="email">    <input type="password">  </form> 

google chrome (and other browsers) able offer saving email , password without problems. chrome autofills kind of form on page load without problems.

i need develop feature, "remembers" last user via localstorage , shows fancy ui includes name , email , only asks password time:

 <div>welcome our old customer umut (remembered@email.com)</div>   <form>    <input type="hidden" value="remembered@email.com">    <input type="password">  </form> 

this time, chrome doesn't autofill password on pageload when user focus field, choice of users first:

demo

i wonder, if there way tell browser that, have email selected, , want password that email autofilled on page load.

cross browser if possible.

ps. if don't use hidden type on email, instead make invisible user (using display:none), chrome autofills both email , password. means that, invisible email filed overriden value google chrome 'remembered'. see remembered@email.com fancy custom design, both email , password modified chrome.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -