• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

html form - disable submit on hitting enter key

dsfunk

Golden Member
How do you disable submitting the form when the Enter key is pressed?

Also, Is it possible to make Enter act as Tab to go through the fields?
 
Why would you want to do either of these? Hitting enter to tab is just a horrible idea. That is breaking a fundamental understanding of how forms work in web pages.

Disabling submit on enter is silly too. Disabling submit on submit, well THAT makes sense if you want a simplistic way of preventing double submits.
 
Originally posted by: torpid
Why would you want to do either of these? Hitting enter to tab is just a horrible idea. That is breaking a fundamental understanding of how forms work in web pages.

Disabling submit on enter is silly too. Disabling submit on submit, well THAT makes sense if you want a simplistic way of preventing double submits.

Custom web applications may require either of these features.

For a general web page, I agree, it's a bad idea.
 
We disabled "enter" to submit on a form clients fill out to request info from our company. for some odd reason, tons of people were entering info, then hitting "enter" to go to the next field, and it would submit partially, then they'd have to go back and add everything else they wanted to. I can't see replacing the "tab" functionality with the "enter" key, but I do see a reason to force them to actually click on "submit" to submit the form. Just my $.02.
 
I agree Tab would be the preferred way of using the form. However, this application is replacing an old application, and it will act just like the original.

I have another question. I am using the code that Mr. Chad linked to. This works great, except for one thing. How can I get the 'Enter' key presses to follow the Tab Index? They ignore it currently.
 
Back
Top