custom/plugins/SwagCmsExtensions/src/Resources/views/storefront/element/custom-form/form-components/form-component-textarea.html.twig line 1

Open in your IDE?
  1. {% block swag_cms_extensions_form_component_textarea %}
  2.     <div class="form-group {% if not field.translated.config.scalable %}not-resizable{% endif %} col-md-{{ field.width }}">
  3.         {% block swag_cms_extensions_form_component_textarea_label %}
  4.             <label class="form-label" for="form-{{ form.technicalName }}-{{ field.technicalName }}">
  5.                 {{ field.translated.label }}{% if field.required %} {{ "general.required"|trans }}{% endif %}
  6.             </label>
  7.         {% endblock %}
  8.         {% block swag_cms_extensions_form_component_textarea_input %}
  9.             {% apply spaceless %}
  10.                 <textarea name="{{ field.technicalName }}"
  11.                           id="form-{{ form.technicalName }}-{{ field.technicalName }}"
  12.                           class="form-control{% if formViolations.getViolations( '/' ~ field.technicalName ) %} is-invalid{% endif %}"
  13.                           placeholder="{{ field.translated.placeholder }}"
  14.                           {% if field.translated.config.rows %}rows="{{ field.translated.config.rows }}"{% endif %}
  15.                           {% if field.required %}required="required"{% endif %}
  16.                           {% if field.translated.errorMessage %}data-form-validation-error-message="{{ field.translated.errorMessage }}"{% endif %}>
  17.                     {{ data.get(field.technicalName) }}
  18.                 </textarea>
  19.             {% endapply %}
  20.             {% if formViolations.getViolations( '/' ~ field.technicalName ) is not empty %}
  21.                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  22.                     violationPath: ('/' ~ field.technicalName)
  23.                 } %}
  24.             {% endif %}
  25.         {% endblock %}
  26.     </div>
  27. {% endblock %}