<div class="newsletterFormWrap">

    <form action="/newsletter/" method="post" class="newsletterForm">

        {% if settings.USE_NAME_FIELDS == true %}

            <div class="row{% if newsletter_details.errors.newsletter_first_name %} errorWrap showError{% endif %}">

                <div class="inputWrap">
                    <input type="text" name="newsletter_first_name" class="text" placeholder="First Name" value="{{ newsletter_details.request.newsletter_first_name }}" />
                </div> <!-- .inputWrap -->

                {% if newsletter_details.errors.newsletter_first_name %}
                    <div class="validationMessage">{{ newsletter_details.errors.newsletter_first_name }}</div> <!-- .validationMessage -->
                {% endif %}

            </div> <!-- .row -->

            <div class="row{% if newsletter_details.errors.newsletter_surname %} errorWrap showError{% endif %}">

                <div class="inputWrap">
                    <input type="text" name="newsletter_surname" class="text" placeholder="Surname" value="{{ newsletter_details.request.newsletter_surname }}" />
                </div> <!-- .inputWrap -->

                {% if newsletter_details.errors.newsletter_surname %}
                    <div class="validationMessage">{{ newsletter_details.errors.newsletter_surname }}</div> <!-- .validationMessage -->
                {% endif %}

            </div> <!-- .row -->

        {% endif %}

        <div class="row {% if newsletter_details.errors.newsletter_email %} errorWrap showError{% endif %}">

            <div class="inputWrap {% if attach_button_to_email is not empty %}withButton{% endif %}">

                <input type="email" name="newsletter_email" class="text" placeholder="Email address" value="{{ newsletter_details.request.newsletter_email }}" />

                {% if attach_button_to_email is not empty %}
                    <button type="submit" name="signup" class="btn"><i class="far fa-long-arrow-right"></i></button>
                {% endif %}

            </div> <!-- .inputWrap -->

            {% if newsletter_details.errors.newsletter_email %}
                <div class="validationMessage">{{ newsletter_details.errors.newsletter_email }}</div> <!-- .validationMessage -->
            {% endif %}

        </div> <!-- .row -->

        {% if attach_button_to_email is empty %}
            <button type="submit" name="signup" class="button">Sign up</button>
        {% endif %}

        <input type="hidden" name="newsletter_action" value="newsletter_subscribe"/>
        <input type="text" name="answer" value="" class="answer"/>

    </form> <!-- .newsletterForm -->

</div> <!-- .newsletterFormWrap -->
