2

I have an internal app for my company and we usually ask for credit card information, since a given user often processed several credit cards a day, it is not advisable to have on the autocomplete, we added an autocomplete="off" attribute to our inputs to prevent this, but chrome seems to ignore this, and it is still showing suggestions to our users. We have removed the autocomplete from all the other fields our users requested, but this one just won't go

I have seen several questions regarding this topic but they're all about passwords and my question seems to be a bit more specific, so

Here is how the input tag looks like:

<input autocomplete="off" class="form-control" 
       data-card-number="data-card-number" 
       data-val="true" 
       data-val-creditcard="The CardNumber field is not a valid credit card number." 
       data-val-required="The CardNumber field is required." 
       id="CreditCardInfo_CardNumber" 
       name="manolo" 
       style="padding-left: 55px;" 
       type="text" 
       value="">

What should I do to prevent Chrome from suggesting credit cards numbers?

It would be better if I could do it in HTML only.

Disable form autofill in Chrome without disabling autocomplete [duplicate]

Disabling Chrome Autofill

Luiso
  • 3,658
  • 2
  • 32
  • 57
  • 1
    Similar to what @120M said, just do the opposite of: https://stackoverflow.com/a/41965260/1336653. The `autocomplete="off"` should work though. Is it possible to post a piece of the HTML form so we can see how you're using it? – noahnu Dec 08 '17 at 17:04
  • @noahnu I added the html snippet so you can see if there is something wrong. thanks – Luiso Dec 08 '17 at 22:08

1 Answers1

2

Try to change your input name to something else, for example randomWord

<input type="text" name="randomWord">
Tmba
  • 205
  • 1
  • 11