1

How? Does it scrape the website for adjacent input tags, one with text and one with password? No matter which website I visit, it accurately prompts a dropdown (Touch ID on Safari) on the username field. How can I build something similar?

1

1 Answer 1

0

HTML for a name field maybe

        <label for='idName' class="required">Your name</label>
          <input type='text' name='inpName' id='idName' class='full_width'
           maxlength='60' autocomplete='username' value=''>

It is the autocomplete attribute that does the magic.

Some values are

  • username
  • current-password
  • email
  • tel

See Here for a list

You can use other attributes such as name and id as well.

4
  • I don't think so. Many sites that have password managers trigger don't use "autocomplete" - some of mine included.
    – Steve
    Commented Apr 7, 2023 at 23:06
  • @Steve, my experience is different. And I did say that you can use other attributes. Commented Apr 11, 2023 at 20:14
  • I don't understand why @RohitGupta gets downvoted because he is right. More info on how password managers like LastPass, 1Password etc detect and autofill input fields can be found here stackoverflow.com/questions/20954944/… and here hidde.blog/…
    – Maurice
    Commented Apr 13, 2023 at 2:31
  • @Maurice, I assume it was Steve, and it's his prerogative to downvote. Commented Apr 13, 2023 at 3:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.