Use the "placeholder" attribute to deduce the length of a credit card expiry year field

Options

While auto-filling a credit card form on Skrill, I discovered that 1Password tried to enter a four digit expiry year into a field that only asked for (the last) two digits. An improvement in the algorithm for how to fill out credit card forms would be appreciated.

I understand that auto-filling credit card forms is notoriously hard and that there's no standard to follow. However, there are a few hints given in forms that 1Password currently ignore. I'm not sure what 1Password does with the maxlength attribute, but that's a pretty obvious place to look for the length of a year (two or four digits).

As I discovered, the form field on Skrill does not contain maxlength, but it does contain placeholder, which is a standard HTML5 way to have a explanatory text appear if the form field is empty. And if the placeholder's value contains two YY characters (as it does in Skrill's form), you can pretty safely bet that the form only wants the two last digits of the credit card expiry year.

It would be awesome if you could implement this in your credit card auto-fill algorithm. Thanks!

Comments

  • Meek
    edited May 2015
    Options

    Hey @asbjornu,

    Thank you so much for the suggestion and for letting us know about this site! I totally agree with you - this would be a very useful way to decide what value to fill.

    I can't promise an exact date of when we'll get to this, but I have added it to our todo list! :)

    ref: OPX-989

  • asbjornu
    asbjornu
    Community Member
    Options

    Excellent! :+1: :smile:

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    Thanks again for the feedback. Cheers! :chuffed:

This discussion has been closed.