Sometimes, you just gotta disable pressing the Enter key to submit a form. Maybe you are requiring the user to perform certain actions, maybe you are forced to support multiple browsers and pressing Enter doesn’t perform the same way in all browsers. Whatever the case, here’s one way to do it:
First, on your input field, included an onKeyPress attribute, thus:
Then, include a js function disableEnter, thus:
Enter should now be disabled for form submission.