Avoid submit when pressing enter

Something easy i think, but i wanted to know some solutions on how people avoid this situation.
In my application i use a dialogbox to allow my user to enter some comments about the topic.
The dialogbox consists of OK and Cancel and an input form with multiple lines.

Now when the user presses Enter the form was being submitted instead of a new line in the input box ( CTRL + enter )
I solved it by doing a validation in my Save event.

Does anyone have another perhaps easier solution for this ?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

In the (layout region) forms propertybox, 2nd tab, select "Allow multiple lines".
You can user ENTER now.... no need to use CTRL + ENTER.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I'm confused... web or Notes client?

In Notes, normally pressing enter in a field gives you a new line.  The only exception Ican thing of is when you use a field within a layout region, and in that case, it would close the dialog box even if you pressed control-enter.  I conclude this isn't a Notes client problem.

So, I assume that the problem occur on the web, not in Notes.  Enter as submit on the web is a function of the browser design, not Domino.  If you are in an input object, pressing enter will effetively click the submit button in many cases.  However, when that is the case, control-enter has absoluetly no effect -- it is ignored by the browser.  So, I conclude this is not a browser problem.

Wait, then what is it?  Imust be missing something here... please describe exactly what you built, and how you access it.

Note: The browser enter-as-submit only occurs in input objects, not textarea objects.  Dmino generates input objects for most fields, but there are some exceptions.

Note: Don't know what CRAK's talking about, haven't seen a chekcbox "Allow multiple lines"
Wait, never mind, I remember what CRAK's talking baout.  If you use "Native OS style" fields instead of Notes-style fields on teh Notes lcient, thne you get the option to allow multiple lines in a field or to not allow it (that's on the FIELD properties box, second tab).  If you "don't allow" multiple lines, control-enter bypasses that (bad Iris, bad), and pressing enter in a such a field passes the ENTER-KEY even from the field to the dialog, which treats it as an OK request.

So, CRAK's right, except he's on crack about which properties box affects this :)
Who's on crack? Watch your or I'll report you to the PE for flaming! <GRIN>

I just forgot to mention: its a property of the FIELD on the form holding the layout region.
Looking for it in the form's properties is indeed a waste of time!
Pure quality, qwalitee!
Consider your own response "If you use "Native OS style" fields instead of Notes-style fields ...".
Our mission was a dialogbox.... ergo: a layout region. Is there a notes style field available in a layout region?

Sorry mate, couldn't resist. Let's blame it on monday! ;-))
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.