Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.
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.
Property | Description | Default value |
---|---|---|
rows | Number of text rows. | 1 |
maxLength | Define the maximum number of characters in the field. Value -1 is considered unlimited. | -1 |
5.0+
The
width
property is no longer supported. Field width is now defined by CSS.
New 6UI content.