Skip to main content

Textarea

Generates a textarea with options to control the number of rows (the height) of the element as well as additional help and guidance information.

info

A textarea will default to two rows in height to differentiate themselves from regular text inputs.

Basic usage

{{
form.textarea({
'label': 'My label',
'id': 'guid-' ~ random(),
'name': 'textarea-1'
})
}}

Helper options

You can configure this helper using the common helper options. The following options are specific to this helper.

OptionTypeDescription
rowsintegerThe number of horizontal rows of text used to control the height of the input (default 2)

Rows

The height of a textarea can be increased by defining a number of rows that suits your expected input. If you expect a lot of content, provide more rows.

{{
form.textarea({
'label': 'My label',
'id': 'guid-' ~ random(),
'name': 'textarea-3',
'rows': 5
})
}}