{% for field in form_base %}
    <div class="w-100 mb-2 {% if field.errors %}field-has-errors{% endif %}">
        <div class="form-floating">
            {{ field }}
            <label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
        </div>

        {% if field.errors %}
            <div class="mt-1">
                {% for error in field.errors %}
                    <small class="d-block text-danger">* {{ error }}</small>
                {% endfor %}
            </div>
        {% endif %}

        {% comment %}
            {% if field.help_text %}
                <small class="form-text d-block text-muted mt-1">{{ field.help_text }}</small>
            {% endif %}
        {% endcomment %}
    </div>
{% endfor %}

{% for field in form_local %}
    <div class="w-100 mb-2 {% if field.errors %}field-has-errors{% endif %}">
        <div class="form-floating">
            {{ field }}
            <label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
        </div>

        {% if field.errors %}
            <div class="mt-1">
                {% for error in field.errors %}
                    <small class="d-block text-danger">* {{ error }}</small>
                {% endfor %}
            </div>
        {% endif %}

        {% comment %}
            {% if field.help_text %}
                <small class="form-text d-block text-muted mt-1">{{ field.help_text }}</small>
            {% endif %}
        {% endcomment %}
    </div>
{% endfor %}

{% if form.non_field_errors %}
    <div class="alert alert-danger mb-0 small">
        {% for error in form.non_field_errors %}
            {{ error }}
        {% endfor %}
    </div>
{% endif %}
