f:form.textfield¶
This ViewHelper allows you to create a simple text input field.
Properties¶
All the universal tag attributes
All the universal form field attributes
Exclusive properties of this ViewHelper¶
autofocus¶
- Variable type
- String
- Description
- Specifies that an input should automatically get focus when the page loads.
- Default value
- Empty string
- Mandatory
- No
disabled¶
- Variable type
- String
- Description
- Specifies that the input element should be disabled when the page loads.
- Default value
- Empty string
- Mandatory
- No
maxlength¶
- Variable type
- Int
- Description
- The maxlength attribute of the input field (will not be validated).
- Default value
- 0
- Mandatory
- No
readonly¶
- Variable type
- String
- Description
- The readonly attribute of the input field.
- Default value
- NULL
- Mandatory
- No
size¶
- Variable type
- Int
- Description
- The size of the input field.
- Default value
- 0
- Mandatory
- No
placeholder¶
- Variable type
- String
- Description
- A helpful, short piece of text, which disappears when a value is entered to the field.
- Default value
- NULL
- Mandatory
- No
pattern¶
- Variable type
- String
- Description
- HTML validation pattern.
- Default value
- NULL
- Mandatory
- No
errorClass¶
- Variable type
- String
- Description
- CSS class to set if there are errors for this view helper.
- Default value
- f3-form-error
- Mandatory
- No
required¶
- Variable type
- Boolean
- Description
- If this property is used, then the field is marked as being obligatory, so that a third party or browser-embedded validator can be appropriately implemented.
- Default value
- FALSE
- Mandatory
- No
type¶
- Variable type
- String
- Description
- The usual type is “text”, but several other types are available under the HTML5 definition. For example,
url
,email
,date
. - Default value
- text
- Mandatory
- No
Examples¶
<f:form.textfield property="address" />
or
<f:form.textfield name="myExtName[address]" />
<f:form.textfield name="myExtName[email]" type="email" required="TRUE" />