I have a form with select tags labeled autocomplete='cc-exp-month' and autocomplete='cc-exp-year'. Chrome will autofill them fine but safari does not fill them. Both chrome and safari fill in the input on the same form labeled autocomplete='cc-number'. Changing tag autocomplete tag to the more general 'cc-exp' didn't seem to help in Safari on either field. Does anyone know how to get Safari to fill out the month and year of the expiration date?
Asked
Active
Viewed 2,137 times
3
-
1Wow, please don't have `autocomplete='cc-number'` for a credit card number. Or any other card holder details for that matter. – Alex K. Apr 11 '14 at 12:14
-
1Why not? I think it's a good feature and helps a lot to the users. – gklka Nov 02 '14 at 13:58
-
what was the solution? – RooWM Mar 14 '16 at 19:47
1 Answers
0
For the element that you want to autocomplete, give it the attribute autocomplete="on". Be cautious with this; it's convenient, but as Alex K. said, not a good idea. Before you start dealing with peoples' information, please take the time to learn about security and at least the most common vulnerabilities. Here's a page explaining the risks of autocomplete.
https://www.hackavoid.com/news/2-why-you-should-avoid-autocomplete-on-login-forms
and hackthissite.org is awesome if you're interested in learning how vulnerabilities are exploited.
Best O' luck, I hope this helped.

ball-tongue
- 26
- 4