{% load filters %}

{% with field=form|get_item:field %}
    <div class="col-xl-{{ size }} col-lg-{{ size }} col-md-{{ size }} col-sm-12">
        {% if field.field.widget.is_hidden is True %}
            {{ field }}
        {% else %}
            <div class="form-group">
                {% if field.field.widget.is_hidden is False %}
                    {{ field.label }}
                {% endif %}

                {% if field.errors %}
                    <ul class="errors">
                        {% for error in field.errors %}
                            <li>{{ error }}</li>
                        {% endfor %}
                    </ul>
                {% endif %}
                {{ field }}
            </div>
        {% endif %}
    </div>
{% endwith %}