6

I have a form that username gets pre-populated from the backend. When the page loads, the username is shown in the username field. When lastpass loads, it changes the username to the username that is saved on the lastpass. It looks like a bug that lastpass overwrites the username when it has a value. Is there a way to prevent this?

enter image description here

In the above video, pre defined username is baz@qux.com. After lastpass is loaded, it changes to foo@bar.com.

PS. I'm the developer. I am looking for a way to prevent this from happening for my users.

AliBZ
  • 3,733
  • 10
  • 41
  • 64

1 Answers1

3

Use

data-lpignore="true"

On your html element.

According to lastpass documentation:

To prevent LastPass icons on your website or application from appearing on non-desired fields, add 'data-lpignore'=true attribute to your form fields, this will prevent LastPass icons from being generated in this particular locations.

Source: https://lastpass.com/support.php?cmd=showfaq&id=10512

Mark Dreyer
  • 144
  • 2
  • I disagree with using a Lastpass specific solution. Ideally you'd use the HTML standard `autocomplete ="off"` and Lastpass would respect it (along with all other password managers). https://stackoverflow.com/questions/2530/how-do-you-disable-browser-autocomplete-on-web-form-field-input-tag – Ben Nov 16 '17 at 16:53
  • Mark, thanks for answer but what you suggested only removes the icon. Lastpass still changes the username value. – AliBZ Nov 17 '17 at 01:54
  • @Ben Lastpass still changes the input with autocomplete="off". – AliBZ Nov 17 '17 at 01:57
  • @Ben https://stackoverflow.com/questions/20954944/stop-lastpass-filling-out-a-form – AliBZ Nov 17 '17 at 02:19