{% load i18n static %}
{% for field in form %}

    {% if field.field.content_definition %}

        {% if field.field.allow_multiple == True %}

            {% if field.field.is_first %}
                <div class="row field-label">
                    <div class="col-12">
                        {{ field.label }}
                    </div>
                    {% if field.help_text %}
                        <div class="col-12">
                            <small class="form-text text-muted">{{ field.help_text }}</small>
                        </div>
                    {% endif %}
                </div>
                <div id="{{ field.field.content_key }}-container" class="row">
            {% endif %}


                {{ field }}

            {% if field.field.is_last %}
                </div>
            {% endif %}
        {% else %}
            <div class="row field-label">
                <div class="col-12">
                    {{ field.label }}&nbsp;
                    {% if field.field.language %}
                        <img src="{% static 'localcosmos_server/images/countries/' %}{{ field.field.language }}.gif" /> {{ field.field.language }}
                    {% endif %}
                </div>
                {% if field.help_text %}
                    <div class="col-12">
                        <small class="form-text text-muted">{{ field.help_text }}</small>
                    </div>
                {% endif %}
            </div>
            <div id="{{ field.field.content_key }}-container" class="row">

                {{ field }}

            </div>
        {% endif %}

    {% else %}
            {% include 'localcosmos_server/bootstrap_field.html' %}
    {% endif %}

{% endfor %}