{% load widget_tweaks %} {% with widget=field.field.widget %} {% if field|widget_type == "checkboxselectmultiple" %}
{{ field }}
{% elif field|widget_type == "checkboxinput" %}
{% else %} {{ field|add_class:'form-control' }} {% endif %} {% endwith %}