Prevent chrome from autofilling creditcard info
Add autocomplete="nope"
, to your input tag if you don't want it to auto-populate with anything. The browser will try to process it and since nope
is not an acceptable option for it the browser will give up on processing it.
The only solution I found that is actually working with chrome 89.0.4xxxx
<input style="display: none;" autocomplete="cc-csc"/>
How is this solution intended to work:Basically, we give an alternative for chromium browsers to match by a specific autocomplete key (cc-csc
) and not one that is more generic (number
) by name or other secondary looked-up data.
You can find details on the topic here
Here you can find a fixed example, comment out line with the fix to compare:https://jsfiddle.net/bogdanm/sj0ewfqv/7/
I know this question has already been answered, but I'm going to put my two cents in anyway.
Another way to do this(as far as I know), is when making the <input>
fields in your HTML document, just don't add the type="ipsum dolor amet"
argument. Then Chrome, or any other browser, won't know what's what and will stay out of it.