Hacker News new | ask | show | jobs
by antsar 2460 days ago
From TFA:

> To test what would happen if Chipotle’s form used these standards, I opened my browser’s developer tools and edited the expiration year field:

> Video of autofill on the Chipotle order form after `maxlength=”2″` has been added using developer tools. It works!

> Adding the maxlength attribute to the field fixes the problem. This makes sense. We’re telling the browser, and by extension the autofill feature, how many digits it should use for the expiration year.

> Autofill is smart enough to know that if we only want two digits for a year field, that the form needs the last two digits of the year. We just need to tell the browser how many digits we expect.