Textarea

Information

Folder
src/components/patterns/form/textarea

Files

Schema
// src/components/patterns/form/textarea/schema.yaml

$schema: http://json-schema.org/draft-07/schema
$id: /patterns/form/textarea
additionalProperties: false
properties:
  attributes:
    type: object
Mocks
// src/components/patterns/form/textarea/mocks.yaml

attributes:
  maxlength: 20
  required: true
  id: textarea-with-max-length
  $drupal: true
Template
// src/components/patterns/form/textarea/textarea.html.twig

{#
  FSK textarea doesn't have the remaining symbols functionality,
  that's why we need to introduce it separately
#}

{% include "@fsk/form/form-element/input/textarea/textarea.html.twig" with {
  attributes: attributes,
  value: value,
  wrapper_attributes: wrapper_attributes,
  icon: icon_html,
  classes: [class],
  disabled: disabled,
  hidden: hidden,
  label: label,
  modifiers: modifiers,
  target: target,
  type: type,
  url: url,
} only %}
{% if attributes.maxlength %}<span class="FskInput-remainingSymbols u-typo-copy-small">noch <span class="js-FskInput-remainingSymbols">{{ attributes.maxlength }}</span> Zeichen</span>{% endif %}

Variants

default
Open
noch 20 Zeichen