{% if form is defined and form.scopes is defined %}

<div class="form-group">
    {{ form.scopes.label(class_='form-label') }}
    <div class="mx-4">
        <div class="form-text text-muted">{{ form.scopes.description }}</div>
        {% for value, label, checked in form.scopes.iter_choices() %}
            <div class="form-check">
                <input class="form-check-input" type="checkbox" name="{{ form.scopes.name }}" value="{{ value }}" {% if checked %} checked {% endif %}>
                <label class="form-check-label">{{ label }}</label>
            </div>
        {% endfor %}
    </div>
</div>

{% endif %}