Template source: bootstrap/_field_horizontal.html

{% load render_widget from bootstrap %} {% if bound_field.is_hidden %} {{ bound_field }} {% else %} <div class="form-group {{ bound_field.html_name }}{% if bound_field.errors %} has-error{% endif %}{% if bound_field.field.required %} required{% endif %}"> {% if show_label %} <label class="col-sm-2 control-label" for="{{ bound_field.html_name }}_id">{{ bound_field.label }}</label> {% endif %} <div class="col-sm-10{% if not show_label %} col-sm-offset-2{% endif %}"> {% if input_type == "input" or input_type == "textarea" or input_type == "select" %} {% render_widget bound_field class="form-control" %} {% endif %} {% if input_type == "checkbox" %} <label class="checkbox" for="id_{{ bound_field.html_name }}"> {% render_widget bound_field class="form-control" %} {{ bound_field.label }} </label> {% endif %} {% if input_type == "radio" %} {% for value, name in bound_field.field.choices %} {% if value %} <label class="radio" for="id_{{ bound_field.html_name }}_{{ forloop.counter0 }}"> <input type="radio" value="{{ value }}" name="{{ bound_field.html_name }}" id="id_{{ bound_field.html_name }}_{{ forloop.counter0 }}" class="form-control"> {{ name }} </label> {% endif %} {% endfor %} {% endif %} {% if input_type == "multi_widget" %} <div class="row"> {% render_widget bound_field class="form-control" %} </div> {% endif %} {% if bound_field.help_text %} <span class="help-block">{{ bound_field.help_text }}</span> {% endif %} {% if bound_field.errors %} {% for error in bound_field.errors %} <span class="label label-danger">{{ error }}</span> {% endfor %} {% endif %} </div> </div> {% endif %}