Generally - yes, it is best practice to allow the user to hit
enter to submit the form at any time.
if you are filling out a long form and hit enter in the middle of the form should it submit?
Specifically to this use case, your form needs to constructed properly to apply the action appropriately.
If there are required fields that are blank the form should not submit. Client side validation would help the user verify any missing fields.
If there are optional fields that are blank your interface should not force the user to click through them to be able to press
enter. Imagine a form with 20 fields, 4 being required - not allowing the
enter key to submit the form at all, or only when the focus is on the last field, basically forces the user to go to the mouse. They aren't going to
tab 16 times so they can press
While not necessarily a situation in many consumer applications, think of it in terms of data entry. I should be able to enter multiple records without having to take my hands off the keyboard, thus I should be able to press
enter whenever I need to (assuming required fields are complete).
Switching between input devices is also considered time consuming. Multiple steps need to happen in order for this to happen - the user needs to:
- mentally stop engagement with the keyboard,
- find and move to the mouse,
- switch interaction mental models to using the mouse,
- find the cursor on the screen,
- find the target,
- move the cursor to the target and
- finally engage with the target.
- repeat to move your focus back the keyboard.
This can all take a few seconds. Not a big deal if I'm just dealing with a form or questionnaire that I'm only to going to fill out once; but go back to the data entry example and multiply those interaction requirements a few hundred times. The time "wasted" in switching input modes starts to become quite measurable, and the back-and-forth is just annoying for the user.