Page tree
Skip to end of metadata
Go to start of metadata

TextFieldDefinition renders a field that allows the user to enter textual values. It is one of the most commonly used UI components.

This text field definition is part of the Magnolia 6 UI framework. The fully qualified class name is info.magnolia.ui.field.TextFieldDefinition.

If you work with the Magnolia 5 UI framework, see Text field for Magnolia 5 UI instead.

Example text field definition

text:
  $type: textField
  label: Body
  rows: 5
  maxLength: 300

Text field properties

rows

optional

Number of rows in the field. When set to 0, the actual number of rows is determined implicitly by the field. When set to a value greater than 1, a text area is rendered.

maxLength

optional, default is -1

Maximum number of characters allowed in the field. Value of -1 means unlimited.

A counter below the field shows how many characters you have left.

See also Common field properties.

  • No labels