Brad Frost

Single-Field Credit Card Input Pattern

Single Credit Card Input Demo Forms suck. And they especially suck on mobile devices. Luke Wroblewski has been talking for a long while now about how input masks make form entry a lot less painful for people. He recently highlighted Square Wallet's clever single-field credit card capture pattern. The post referenced a phenomenal port of Square's native app behavior for the Web by Zachary Forrest (@zdfs). Zachary's excellent work was just what I needed to get started creating the Greater Pittsburgh Community Food Bank's donation form (as part of our open redesign of their site). I ended up tinkering with Zachary's initial script a bit and made a few alterations:

You can see the pattern on Github, view a demo, or see it in action on our project's prototype. Screen I want to give a massive thank you to Zachary Forrest for putting together such a great script. I'm sure I'll be tweaking the entire donate experience over the course of the project, so if you'd like to contribute to the project we'd really appreciate it! *[DETAILS]: Device, Environment, Time, Activity, Individual, Location, Social *[RESS]: Responsive Design with Server-Side Components