<div class="o-textarea o-form__item">
<label for="textarea-name">
Label
<span class="o-asterisk">*</span>
</label>
<textarea id="textarea-name" name="textarea-name" rows="5" cols="10" required="true"></textarea>
<span class="o-field-note">
This is a field note.
</span>
</div>
{% set base_class = textarea.base_class|default('o-textarea') %}
{% if textarea.name %}
<div class="{{ bem(base_class, textarea.element, textarea.modifiers, textarea.extra) }}{{ textarea.error ? ' is-error' }}{{ textarea.attributes.disabled ? ' is-disabled' }} o-form__item" {{ attributes(textarea.container.attributes) }}>
{% if textarea.label %}
<label for="{{ textarea.name }}"{{ textarea.label_hidden ? ' class="is-visually-hidden"' }}>
{{ textarea.label }}
{% if textarea.attributes.required %}
<span class="o-asterisk">*</span>
{% endif %}
</label>
{% endif %}
<textarea id="{{ textarea.name }}" name="{{ textarea.name }}" rows="{{ textarea.rows }}" cols="{{ textarea.cols }}" {{ attributes(textarea.attributes) }}></textarea>
{% include "@field-note" with textarea %}
{% include "@notification" with textarea %}
</div>
{% endif %}
{
"textarea": {
"name": "textarea-name",
"label": "Label",
"rows": 5,
"cols": 10,
"field_note": {
"text": "This is a field note."
},
"attributes": {
"required": true
}
}
}
No notes defined.