Appearance
textarea
Renders a <textarea> element with automatic content re-population from submitted form data.
Usage
liquid
{% textarea name: 'message', class: 'form-control' %}Options
All standard HTML textarea attributes are supported, including data- attributes. Pass them as key/value pairs.
| Option | Description |
|---|---|
name | Field name. Used to auto-populate content from submitted form data. |
id | ID attribute. |
class | CSS classes. |
text | Default text content. Overridden automatically if a submitted value exists. |
placeholder | Placeholder text. |
required | Pass required: 'required' to mark the field as required. |
data-* | Any data- attributes are supported, e.g. data-foo: 'bar'. |
WARNING
Attributes without values are ignored — use required: 'required' rather than required alone.
Auto-population
When a name is set, the textarea content is automatically restored from submitted form data after a failed submission.
Example
liquid
{% textarea name: 'message', class: 'form-control', placeholder: 'Your message', required: 'required' %}