INPUT instruction configuration

This section describes the options that can be specified in the ATTRIBUTES clause of the INPUT instruction. The options of the ATTRIBUTES clause override all default attributes and temporarily override any display attributes that the OPTIONS or the OPEN WINDOW statement specified for these fields. With the INPUT statement, the INVISIBLE attribute is ignored.

NAME option

The NAME attribute can be used to name the INPUT dialog. This attribute is used to identify the INPUT dialog.

HELP option

The HELP clause specifies the number of the help message to display if the user invokes the help while the focus is in any field used by the instruction. The predefined 'help' action is automatically created by the runtime system. You can bind action views to the 'help' action.

The HELP clause overrides the HELP attribute.

WITHOUT DEFAULTS option

Indicates if the fields controlled by INPUT must be filled (FALSE) or not (TRUE) with the column default values defined in the form specification file or the database schema files. The runtime system assumes that the field satisfies the REQUIRED attribute when WITHOUT DEFAULTS is used. If the WITHOUT DEFAULT option is not used, all fields defined with the REQUIRED attribute must be visited and modified. Fields not defined as NOT NULL can be left empty.

FIELD ORDER FORM option

By default, the tabbing order is defined by the variable binding list in the instruction description. You can control the tabbing order by using the FIELD ORDER FORM attribute. When this attribute is used, the tabbing order is defined by the TABINDEX attribute of the form fields. If this attribute is used, the Dialog.fieldOrder FGLPROFILE entry is ignored.

The OPTIONS instruction can also change the behavior of the INPUT instruction, with the INPUT WRAP or FIELD ORDER FORM options.

UNBUFFERED option

Indicates that the dialog must be sensitive to program variable changes. When using this option, you bypass the traditional BUFFERED mode.

When using the traditional "buffered" mode, program variable changes are not automatically displayed to form fields; You need to execute a DISPLAY TO or DISPLAY BY NAME. Additionally, if an action is triggered, the value of the current field is not validated and is not copied into the corresponding program variable. The only way to get the text of the current field is to use GET_FLDBUF().

If the "unbuffered" mode is used, program variables and form fields are automatically synchronized. You don't need to display explicitly values with a DISPLAY TO or DISPLAY BY NAME. When an action is triggered, the value of the current field is validated and is copied into the corresponding program variable.

ACCEPT option

The ACCEPT attribute can be set to FALSE to avoid the automatic creation of the accept default action. This option can be used for example when you want to write a specific validation procedure, by using ACCEPT INPUT.

CANCEL option

The CANCEL attribute can be set to FALSE to avoid the automatic creation of the cancel default action. This is useful for example when you only need a validation action (accept), or when you want to write a specific cancellation procedure, by using EXIT INPUT.

If the CANCEL=FALSE option is set, no close action will be created, and you must write an ON ACTION close control block to create an explicit action.

Using TTY attributes

The ATTRIBUTES clause can define TTY attributes such as colors (RED, GREEN), and REVERSE. These attributes will be used during the dialog execution.

Important: In GUI mode, form elements can also be decorated with presentation styles. Pay attention to the specific rules that apply when combining TTY attributes and presentation styles.