{% sw_extends '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig' %}
{# label remains unchanged #}
{% block cms_element_form_input_input %}
<input name="{{ fieldName }}"
{% if type %}type="{{ type }}"{% endif %}
id="form-{{ fieldName }}"
{# if contact form was clicked from product detail page, description question tab parameters will be in url #}
{% if fieldName == "subject" and app.request.query.get('sku') and app.request.query.get('name') %}
value="Produkt: {{ app.request.query.get('name') }}, Sku: {{ app.request.query.get('id') }}"
{% else %}
value="{{ data.get( fieldName ) }}"
{% endif %}
placeholder="{{ placeholder|trans }}"
{% if required %}required="required"{% endif %}
class="form-control{% if formViolations.getViolations( '/' ~ fieldName ) %} is-invalid{% endif %}"/>
{% if formViolations.getViolations( '/' ~ fieldName ) is not empty %}
{% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with {
violationPath: ('/' ~ fieldName)
} %}
{% endif %}
{% endblock %}