<ul class="checksandradios vertical">
    {% for group_name, choices in optgroups %}{% for choice in choices %}
	    <li><label 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 %}>
	        <span>{{ choice.1 }}</span>
	    </label></li>
    {% endfor %}{% endfor %}
</ul>
