{% for group, options, index in widget.optgroups %}
    {% if group %}
        <label>{{ group }}</label>
    {% endif %}
    {% for option in options %}
        <div class="form-check">
            <input class="form-check-input" type="radio" 
            value="{{ option.value }}" id="{{ option.attrs.id }}" 
            name="{{ option.name }}">
            <label class="form-check-label" for="{{ option.attrs.id }}">
                {{ option.value }}
            </label>
        </div>
    {% endfor %}
{% endfor %}
