Skip to content Skip to sidebar Skip to footer

How To Prevent Form Elements From Pre-populating In Chrome

I am building a Bootstrap form and the email and password form elements show with pre-populated data from some other or some earlier form login on a different site. The Chrome brow

Solution 1:

Use autocomplete="new-password"

Works a charm!

Solution 2:

Use the autocomplete="off" attribute on the <form> or <input>.

from MDN:

autocomplete

This attribute indicates whether the value of the control can be automatically completed by the browser.

off The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method; the browser does not automatically complete the entry.

on The browser is allowed to automatically complete the value based on values that the user has entered during previous uses...

Also from MDN, see: How to Turn Off Form Autocompletion

Also see:

Post a Comment for "How To Prevent Form Elements From Pre-populating In Chrome"