Form items / Form item types |
Defines a simple line-edit field.
The EDIT form item defines a field to enter a single-line text, for any data type.
This item type is typically used to define character string and numeric form fields.
The EDIT item type can be used for any data type that can be converted to an editable text.
To show a hint to the user when the field has the focus, use the COMMENT attribute.
If the field is mandatory for an input, combine the NOT NULL with the REQUIRED attribute.
The value accepted for the field can be limited with the INCLUDE attribute.
To provide a default value, define the DEFAULT attribute for the field.
Use the DOWNSHIFT or UPSHIFT attributes to force the letter case during input.
Input can be hidden (for example for password fields), with the INVISIBLE attribute.
Especially for mobile devices, use the KEYBOARDHINT attribute to get a specific keyboard when entering values into the field.
Input completion proposals can be implemented with the COMPLETER attribute.
Some front-ends support different presentation and behavior options, which can be controlled by a STYLE attribute. For more details, see Common style attributes and Edit style attributes.
In grid-based layout, the input length in an EDIT fields is defined by the item tag and may need to get the SCROLL attribute. For more details, see Field input length.