I\'m iterating through the fields of a form and for certain fields I want a slightly different layout, requiring altered HTML.
To do this accurately, I just need to
As of Django 1.11, you can just use widget.input_type. Example:
widget.input_type
{% for field in form.visible_fields %} {% endfor %}