Allow form autocomplete inside chrome extension popup
I created a chrome extension that feeds data from a form using json for an external source. However, I would like to allow users to save their username and password required to submit data. I've tried adding x-autocompletetype attributes to my inputs to no avail.
How can I allow users to save this information or make Chrome autocomplete these inputs?
<div class="col-6">
User: <input type="text" name="username" id="username" value="" class="form-control" required x-autocompletetype="username">
</div>
<div class="col-6">
Pass: <input type="password" name="password" id="password" value="" class="form-control" required x-autocompletetype="password">
</div>
source to share
From my testing experience the x-autocomplete tag does nothing in the latest chrome release. Instead, try using autocomplete tags for your input tags and set their values โโaccording to the HTML spec here http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and- forms.html # autofill-field .
For example:
<input name="username" autocomplete="username" type="text" placeholder="username" required>
Also keep in mind that the parent form tag needs autocomplete = "on" and method = "POST". Hope it works.
source to share