Form file structure / ATTRIBUTES section |
The FIELD item type defines a generic form field that can be defined in database schema files.
FIELD item-tag = field-name [ , attribute-list ] ;
COMMENT, DEFAULT, FONTPITCH, HIDDEN, NOT NULL, NOENTRY, REQUIRED, SAMPLE, STYLE, SIZEPOLICY, TAG, TABINDEX.
Table Column only: UNSORTABLE, UNSIZABLE, UNHIDABLE, UNMOVABLE, TITLE.
The FIELD item type defines a generic form field for data input or display. The real item type (i.e. the widget) and the attributes must be defined in the database schema files.
The definition of the form field is determined by the .val database schema file, based on the field-name (table.column). The item type (EDIT, COMBOBOX, etc) is defined by the ITEMTYPE attribute of the .val file.
By using this form field specification, you can centralize the definition of form fields in the database schema file. You can, for example, specify that the "order.state" database column is a COMBOBOX, with a list of ITEMS, as if the field was defined directly in the form specification file.
It is also possible to use the attributes defined in the database schema files with other form item types.
The attributes defined directly in the form specification file take precedence over the attributes defined in the database schema files.
FIELD f001 = order.state, REQUIRED, STYLE="important";