Form specification files / Form item attributes |
The WANTNORETURNS attribute forces a text field to reject newline characters when the user presses the Return key.
WANTNORETURNS
By default, text fields like TEXTEDIT insert a newline (ASCII 10) character in the text when the user presses the Return key. As the Return key is typically used to fire the accept action to validate the dialog, you can force the field to reject Return keys with this attribute.
The user can still enter newline characters with Shift-Return or Ctrl-Return, if these keys are not bound to actions.