HELP:Press on Enter

Hello there,I have got a form where there is one field…the form is call as a dialogbox,hence having the actions ‘ok’ and ‘cancel’ on it when being displayed to the user.

What user wants is when he clicks on the button ‘enter’ instead of inserting a new line in the field it should have the same effect as clicking on the action ‘OK’ on the dialogbox…

Can please someone tell me how to do that in the field?

Subject: HELP:Press on Enter

there is a code bin for this on openntf:

http://www.openntf.org/Projects/codebin/codebin.nsf/0/305403B7304DA25D86257309005DD885

Subject: RE: HELP:Press on Enter

In a dialogbox, you don’t need the code from openntf. Just set the field to not allow multiple lines (look for checkbox in field properties) and Enter will be interpreted as pressing the default button in the dialog (usually, OK). Assumes a “native” style field.