custom/plugins/GrimmTheme/src/Resources/views/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig' %}
  2. {# label remains unchanged #}
  3. {% block cms_element_form_input_input %}
  4.     <input name="{{ fieldName }}"
  5.             {% if type %}type="{{ type }}"{% endif %}
  6.             id="form-{{ fieldName }}"
  7.             {# if contact form was clicked from product detail page, description question tab parameters will be in url #}
  8.             {% if fieldName == "subject" and app.request.query.get('sku') and app.request.query.get('name') %}
  9.                 value="Produkt: {{ app.request.query.get('name') }}, Sku: {{ app.request.query.get('id') }}"
  10.             {% else %}
  11.                 value="{{ data.get( fieldName ) }}"
  12.             {% endif %}
  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 %}