Prevent chrome from autofilling creditcard info

后端 未结 2 1832
隐瞒了意图╮
隐瞒了意图╮ 2020-12-20 13:42

I have a on my checkout form, and somehow Chrome thinks that this field is a credit card expiration month.

2条回答
  •  星月不相逢
    2020-12-20 14:07

    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.

    See - https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#Disabling_autocompletion.

提交回复
热议问题