Prevent browser from filling in stored username/password from LoginForm

Hi!

In my application I use the LoginForm. This works fine but in my application I have a few more username and password fields which all get automatically filled with those saved credentials from the login form. They are supposed to be empty but setting the value=null or “” doesn’t help… I guess it’s browser related but I was wondering if anybody knows how to prevent this behaviour in Vaadin? I tried changing the element attributes by using autocomplete=“off” but it didn’t work. Any other ideas?

Thanks in advance!

I solved it by using a hidden input field… not the most beautiful way but it works for now.

// add hidden text/password-fields to prevent browser from filling in stored username/password anywhere else
Label lblHidden = new Label("<input type='text' style='display:none;'/><input type='password' style='display:none;'/>", ContentMode.HTML);

Hi Moritz,
I’ m encountering the same issue with Vaadin 8 in Google Chrome. I tried your suggestion.Unfortuanately it seems not working for me with Chrome. Do you have any clue, how to workaround with Chrome

Thanks in advance!

I’m also facing this issue again… Firefox wants to refresh the the stored login data in every other dialogue where there are PasswordFields.

Did you find a solution for this? Im facing the same issue…

no, still struggling with that one!

Has anyone found a solution for this? I’ve tried all of the suggestions with no luck.