vendor/shopware/storefront/Resources/views/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig line 1

Open in your IDE?
  1. {% block cms_element_form_input %}
  2.     <div class="form-group {{ additionalClass }}">
  3.         {% block cms_element_form_input_label %}
  4.             <label class="form-label" for="form-{{ fieldName }}">
  5.                 {{- label|trans -}}{% if required %} {{- "general.required"|trans -}}{% endif %}
  6.             </label>
  7.         {% endblock %}
  8.         {% block cms_element_form_input_input %}
  9.             <input name="{{ fieldName }}"
  10.                    {% if type %}type="{{ type }}"{% endif %}
  11.                    id="form-{{ fieldName }}"
  12.                    value="{{ data.get( fieldName ) }}"
  13.                    placeholder="{{ placeholder|trans }}"
  14.                    {% if required %}required="required"{% endif %}
  15.                    class="form-control{% if formViolations.getViolations( '/' ~ fieldName ) %} is-invalid{% endif %}"/>
  16.             {% if formViolations.getViolations( '/' ~ fieldName ) is not empty %}
  17.                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
  18.                     violationPath: ('/' ~ fieldName)
  19.                 } %}
  20.             {% endif %}
  21.         {% endblock %}
  22.     </div>
  23. {% endblock %}