{% for subform_id, subform in subforms.items %} {% if subform.visible_fields %} {% include "forms/subform.html" %} {% endif %} {% endfor %}