Da wir 2 unterschiedliche Kontaktfromulare brauchen und es gibt immer noch keine Möglichkeit eine Form über Backend anzupassen habe ich versucht Newsletter-form zu überschreiben.
Hab entsprechend newsletter-form.html.twig innerhalb des Themes angelegt und überschrieben. Soweit funktioniert alles gut nur halt der Text auf submit Button heißt “Speichern” und nicht “Absenden”. general.formSubmit textbaustein ist auf Absenden gesetzt und ich habe keine Änderungen bei cms-element-form-submit.html.twig vorgenommen. Hat jemand eine Idee woran es liegen könnte? Bei dem anderem Kontaktformular wird alles richtig angezeigt. Mein Override sieht so aus:
{% block cms_form_newsletter_select_salutation %}
{% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-select-salutation.html.twig'
with {
additionalClass: 'col-12',
required: true
}
%}
{% endblock %}
{% block cms_form_newsletter_input_name %}
{% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig'
with {
fieldName: 'firstName',
required: true,
additionalClass: 'col-12',
placeholder: 'account.personalFirstNamePlaceholder'
}
%}
{% endblock %}
{% block cms_form_newsletter_input_last_name %}
{% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig'
with {
fieldName: 'lastName',
required: true,
additionalClass: 'col-12',
placeholder: 'account.personalLastNamePlaceholder'
}
%}
{% endblock %}
{% block cms_form_newsletter_input_email %}
{% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig'
with {
fieldName: 'email',
type: 'email',
required: true,
additionalClass: 'col-12',
placeholder: 'account.loginMailPlaceholder'
}
%}
{% endblock %}
{% block cms_form_newsletter_comment_textarea %}
{% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-textarea.html.twig'
with {
rows: 5,
required: false,
fieldName: 'comment',
additionalClass: 'col-12',
placeholder: 'contact.commentPlaceholder'
}
%}
{% endblock %}
{% block cms_form_newsletter_captcha %}
{% sw_include '@Storefront/storefront/component/captcha/base.html.twig' with { 'captchas': shopware.config.core.basicInformation.activeCaptchas } %}
{% endblock %}
{% block cms_form_newsletter_privacy %}
{% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-privacy.html.twig' %}
{% endblock %}
{% block cms_form_newsletter_submit %}
{% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-submit.html.twig' %}
{% endblock %}
{% block cms_form_newsletter_hidden_fields %}
{% block cms_form_newsletter_csrf %}
{{ sw_csrf(action) }}
{% endblock %}
{% endblock %}