{# Outer wrapper: NetBox attrs.html skips class, so id lives in attrs while grid classes are explicit here (never on each input). #}
{% for group, options, index in widget.optgroups %} {% if group %}
{{ group }}
{% endif %} {% for option in options %} {% include option.template_name with widget=option %} {% endfor %} {% endfor %}