{% if form.non_field_errors %}
<div align="center" class="alert alert-danger field_error">
    <strong>
        {{ form.non_field_errors }}
    </strong>
</div>
{% endif %}

{% for field in form %}
    <div class="form-group row">

        <label for="{{ field.id_for_label }}"
               class="col-sm-3 form-control-label align-right input-label">
            {{ field.label }}
        </label>

        <div class="col-sm-9 ">
            <input class="form-control input-text-block {% if field.errors %} field_error {% endif %}"
                   id="{{ field.id_for_label }}"
                   value="{{ field.value|default_if_none:"" }}"
                   name="{{ field.name }}"
                   type="{{ field.field.widget.input_type }}"
            />
        </div>
    </div>

    {% if field.errors %}
        <div class="row">
            <div class="col-sm-offset-4 col-sm-8 text-danger text-center">
                {{ field.errors }}
            </div>
        </div>
    {% endif %}
{% endfor %}