I agree philosophically with the posters who say, "Why do you want to do this?" But I also have someone asking me for this behavior, so I'm in the same boat as you.
I've used Thirster42's solution before, but that only works for me when it's a GET, not a POST. It also seems to be browser-specific -- Firefox won't submit the form when the user hits enter in a textbox, but Safari will. (Firefox 3.5.3, Safari 4.0.3, MacOSX)
Most of what I've seen on the web looks like this: "Q: How do I do this? A: Basically, you don't." I believe this is because the behavior is inconsistent across platforms and web browsers, and what works for Firefox might not work for IE or Opera. Also, you can't rely on javascript if the user has disabled it in the browser.
All that being said, here's what I did that seems to work, borrowing from here and various other places. Tested in Firefox, Safari, and IE 8. JavaScript for header:
function disableEnterKey(e)
{
var key;
if(window.event)
key = window.event.keyCode; // IE
else
key = e.which; // Firefox
if(key == 13)
return false;
else
return true;
}
And then on each input field:
:onKeyDown "return disableEnterKey(event);"
I don't like it so much, but if it makes people happy...