{% load nhsukfrontendforms_tags %} {% with id=widget.attrs.id %}
{% for group, options, index in widget.optgroups %} {% if group %}
{% endif %} {% for option in options %}
{% with input_class=base_class|add:"__input" %} {% include option.template_name with widget=option|add_class:input_class %} {% endwith %}
{% endfor %} {% if group %}
{% endif %} {% endfor %}
{% endwith %}