On a web form, what should happen when the user presses the ENTER key?
I'm writing a sign-up form - name, email, password, sign-up button: the usual sort of thing. Since I'm using JavaScript, and the page does not use the
tag, I have complete control over what happens with each key press. I can make it change the focus, submit the data to the server, validate the field contents, whatever. But what should it do?
Things I'm wondering: should ENTER take the user to the next field (as per TAB key)? Should pressing ENTER while focus is on the final field submit the form?
Answer
Enter should submit the form. Tab should goto the next field.
Users don't usually appreciate it when the keyboard doesn't do what they think it should.
No comments:
Post a Comment