{% for group_name, choices in optgroups %}{% for choice in choices %}
<label class="radio-inline" for="{{ attrs.id }}_{{ forloop.counter }}"><input type="radio" id="{{ attrs.id }}_{{ forloop.counter }}" value="{{ choice.0 }}" name="{{ name }}"{% if required %} required{% endif %}{% if choice.0 in value %} checked{% endif %}> {{ choice.1 }}</label>
{% endfor %}{% endfor %}
