Skip to content

Textarea

Textarea element defines a multi-line text input control.

textarea

Build-in Validators

Element has no build-in validators.

Available Validators

Element has available validators:

Relations Support

Element does not support relations between elements.

Configuration output schema

schema
{
  "<element_type>" : "textarea",
  "<element_name>" : string,
  "<element_label>" : string,
  "<element_labelDescription>" : string,
  "<element_isRequired>" : bool,
  "<element_isHidden>" : bool,
  "<element_defaultValue>" : string,
  "<element_validators>" : []
}
example
{
  "type" : "textarea",
  "name" : "description",
  "label" : "Module description",
  "isRequired" : true,
  "isHidden" : false,
  "validators": [
    { 
      "type" : "length", 
      "options" : { "min" : 9, "max" : 12 } 
    }
  ]
}

Element value

If value is filled: string.

usage in module TWIG
{% if moduleConfig.description %}
    <p>{{ moduleConfig.description }}</p>
{% endif %}

Example of module

Twig

Twig
{% if moduleConfig.description %}
    <p>{{ moduleConfig.description }}</p>
{% endif %}

JSON configuration

JSON configuration
[
  {
    "label": "Content",
    "state": "unfolded",
    "elements": [
      {
        "type": "textarea",
        "name": "description",
        "label": "Module description",
        "isRequired": true,
        "validators": [
          { "type": "length", "options": { "min": 9, "max": 12 } }
        ]
      }
    ]
  }
]

JSON translations

JSON translations
{
  "schema": {
    "pl_PL": {
      "Content": "Treść",
      "Module description": "Opis modułu"
    },
    "en_US": {
      "Content": "Content",
      "Module description": "Module description"
    }
  }
}