FormWalker – walking through form fields with the enter key

In conventional business applications users are used to navigate through form fields just by using the “enter” key rather than using the “tab” key. Especially on forms where they bung in a lot of numeric data (e.g. sales) it’s more common to use the numeric block (numlock) and therefore the “enter” key is more convenient to use … cause there is no tab key. I’ve just written a short javascript snippet which solves this problem. I call it FormWalking.

It’s a straight forward task so I dont really want to write a lot about (the code is at the bottom for all who cannot wait). What’s important is that it uses the prototypeJS library. Be sure to integrate it when using the FormWalker.

Usage: Just mark all your input fields with the CSS class “next” and the user will be able to “walk” through them (If the last field is reached the first field will be activated. so its kinda loop…). All other fields won’t be touched by the script: