Is there a way to prevent the LastPass browser extension from filling out a HTML-based form with a input field with the name "username"?
This is an hidden field, so I don't want any software to use this field for their purposes:
<input type="text" name="username" id="checkusername" maxlength="9" value="1999" class="longinput" style="display:none">
The solution should not be like "rename the input field".
What worked for me is having word "-search-" in the id of the form, something like
<form id="affiliate-search-form">
- and lastpass doesn't add its elements onto the form inputs. It works with something simpler like<form id="search">
but doesn't work with<form id="se1rch">
Add "search" to input id
For me worked either
type=search
which is kinda equal totext
or usingrole=note
.You can check the LastPass-JavaScript but it's huge, may be you can find some workaround there, from what I saw they only check 4 input types, so
input type=search
would be one workaround:Also those are the
role
-keywords they seem to ignore:I checked LastPass'
onloadwff.js
, prepare for 26.960 lines of code :)Bit late to the party but I have just achieved this with modifying the form with:
I guess this fools lastpass into thinking that it's a search form. This does not work for password fields however! Lastpass ignores the name field in this case.
The only way I've managed to do this is to add the following directly at the top of the form:
It causes a nasty flicker but does remove the autofill nonsense - though it does still show the "generate password" widget. LastPass waits until domready and then checks to see if there are any visible password fields, so it's not possible to hide or shrink the mock fields above.
Tried the -search rename but for some reason that did not work. What worked for me is the following:
Tried and tested in latest versions of FF and Chrome.