Text
Supported products
- Central CMS
- Central Forms
- Central Connect
Generates a text input field allowing users to input data, with a variety of options for additional help and guidance information.
Basic usage
- Twig
- HTML
{{
form.text({
'label': 'My label',
'id': 'guid-' ~ random(),
'name': 'text-1'
})
}}
<div class="form__group">
<label for="guid-1303170267" class="control__label">My label</label>
<div class="controls">
<input id="guid-1303170267" name="text-1" type="text" class="form__control" />
</div>
</div>
Helper options
You can configure this helper using the common helper options. The following options are specific to this helper.
Option | Type | Description |
---|---|---|
append | string | Text or markup to include after the input element |
append_type | string | Use only when appending a button. button is the only valid value |
prepend | string | Text or markup to include before the input element |
prepend_type | string | Use only when prepending a button. button is the only valid value |
readonly | bool | Adds readonly attribute and uses a dashed outline to indicate lack of interaction |