{% import 'form_fields/generate_help_tooltip.html' as ght with context %}

<form method="post" action="{{ next_action }}" id="{{ next_action }}" enctype="multipart/form-data">
    <fieldset>
        <legend>{{ legend }}</legend>
        <dl>
            {% for field in adapter_form.fields %}
                <dt {% if field.label_classes %} class="{{ field.label_classes|join(' ') }}" {% endif %}>
                    <label for="{{ field.name }}">{{ field.label }}</label>
                    {{ ght.generate_help_tooltip(field.label, field.doc) }}
                </dt>
                <dd>
                    {{ field | safe }}
                    <p class="errorMessage">
                        {% for error in field.errors %}
                            <span> {{ error }} </span>
                        {% endfor %}
                    </p>
                </dd>
            {% endfor %}
        </dl>
    </fieldset>
</form>