Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.

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

TextFieldDefinition  renders an editable text field. When the rows property is 1 or unspecified, Magnolia renders an HTML input element of type text. When rows is greater than 1, Magnolia renders a textarea.

Class: info.magnolia.ui.form.field.definition.TextFieldDefinition

Here is an example text field definition from the Contacts app.

Node name

Value

 firstName

 

 class

info.magnolia.ui.form.field.definition.TextFieldDefinition

 description

Please enter the contact first name. Field is mandatory

 label

First name

 required

true

You can use all common field properties and the following.

PropertyDescriptionDefault value
rowsNumber of text rows.1
maxLengthDefine the maximum number of characters in the field. Value -1 is considered unlimited.-1

(warning) 5.0+ The width property is no longer supported. Field width is now defined by CSS.