Prevent a form from being submitted when the enter key is pressed while a user is typing in a text field in a form.