{% load widget_tweaks %}

{% if field.auto_id == autofocus %}
    {% render_field field class+="form-control" autofocus="" %}
{% else %}
    {% render_field field class+="form-control" %}
{% endif %}

{% if not field.is_hidden %}
  {% if field.errors %}
    <span class="help-block">
      {% for error in field.errors %}
        <div id="error_{{ forloop.counter }}_{{ field.auto_id }}">
          <strong>{{ error }}</strong>
        </div>
      {% endfor %}
    </span>
  {% endif %}

  {% if field.help_text %}
    <span class="help-block">{{ field.help_text }}</span>
  {% endif %}
{% endif %}
