Invention: Sequential Text Boxes

Windows does it when you’re entering your serial key right after installation, and online forms do it when you’re typing in your phone number, social security number, or zip code. Sometimes, online forms have multiple text boxes for numbers with multiple sets. Instead of the user manually tabbing or clicking over to the next text box to type, the developer can code up some “auto tabbing” JavaScript to move to the next text box automatically as you type in the numbers (Windows and Microsoft Office do this). Unfortunately, no one actually warns you when the form does this on its own. Many times users fill in the first set of numbers and hit the tab button manually only to find out the form tabbed over an extra time, resulting in them having to go back to the previous text box or accidentally filling in the wrong one.

If for some reason you absolutely MUST force users to enter sets of numbers that you are absolutely sure you know the formating of (like social security numbers, long serial keys to software that can’t be copy-pasted, or codes for the nukes) then go ahead and use one text field per set of numbers with auto tabbing in between. To let the user know that you have auto tabbing on, make the text boxes dashed in between sets of numbers by using simple css.

For the Default Dashed Text Box look (like above) insert the following into your css

/* CSS */
input {
border-bottom:1px solid #D4D0C8; /* needed for bug where buttom of last dashed line sticks out */
}
 
#left {
border-right: 1px dashed #929292;
width: 26px;
padding-left: 5px;
}
 
#mid {
border-right: 1px dashed #929292;
border-left: 1px dashed #929292;
width: 20px;
padding-left: 5px;
}
 
#right {
border-left: 1px dashed #929292;
width: 33px;
padding-left: 5px;
}

and match up the (left-mid-right) input text boxes with their CSS selectors (#left, #mid, #right) like this…

<input id="left" type="text" /> -
<input id="mid" type="text" /> -
<input id="right" type="text" />

If you want the border of the text boxes black like this…

then change the “input” selector in your CSS to this…

input {
border: 1px solid black;
background-color: #f8f8f8;
}

Backstory:
I came up with this solution a year ago while typing in my phone number somewhere but haven’t actually implemented it into any of my sites. I’ve never had to collect phone numbers before and even if I did I probably would have used one continuous text box for it, that way people can leave international phone numbers and numbers with lengthy extensions. But it would work great for social security numbers, exact length pin numbers, serial keys, etc…