<div class="row g-3 mb-3">
    {% for field in form.visible_fields %}
        <div class="{{ field.field.widget.attrs.column_class|default:'col-12' }}">
            <div class="form-group">
                {% if field.field.widget.input_type == 'checkbox' %}
                    <div class="form-check form-switch">
                        {{ field }}
                        <label for="{{ field.id_for_label }}" class="form-check-label">{{ field.label }}</label>
                    </div>
                {% else %}
                    <label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
                    {{ field }}
                {% endif %}
            </div>
        </div>
    {% endfor %}
</div>
