{% include 'od/fields/Label.html' with widget=widget %} {% if widget.optgroups|length < 5 %} {% include 'od/fields/RadioGroup.html' with widget=widget %} {% else %} {% for choice_obj in widget.optgroups %} {% for option in choice_obj.1 %} {% if option.value %} {{option.label}} {% endif %} {% endfor %} {% endfor %} {% endif %}