
{% csrf_token %}
<input type="hidden" name="{{ form_name }}" value="1">
{% if form.errors %}
    <div class="alert alert-danger">
        <button type="button" class="close" data-dismiss="alert">×</button>
        {{ form.errors }}
    </div>
{% endif %}
{% for field in form.visible_fields %}
    <div class="form-group">
        <div class="col-sm-4">
            <span id="id_{{ field.name }}_required" class="text-danger">{% if field.field.required %}*{% endif %}</span>{{ field.label_tag }}
        </div>
        <div class="col-sm-8">
            {% if field.errors %}
                <div class="alert alert-danger alert-tiny">
                    {{ field.errors }}
                </div>
            {% endif %}
            <span data-toggle="tooltip" title="{{ field.help_text }}" data-placement="right" data-container="body">
                {{ field }}
            </span>
        </div>
    </div>
{% endfor %}
{% for field in form.hidden_fields %}
    {{ field }}
{% endfor %}
