{% load addcss %}
{% if field.is_hidden %}
  {{ field }}
{% else %}

<div id="div_{{ field.auto_id }}" class="form-group{% if field.errors %} has-error{% endif %}">
  <div class="wiki-label col-xs-3 col-lg-2">
  {% if field.label %}
    <label for="{{ field.id_for_label }}" class="form-control-label {% if field.field.required %}requiredField{% endif %}">
    {% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
    {{ field.label|safe }}
    </label>
  {% endif %}
  </div>
  <div class="wiki-control col-xs-9 col-lg-10">
    {{ field|addcss:"form-control form-control-danger danger" }} 
    {% if field.errors %}
      {% for error in field.errors %}
        <div class="form-control-feedback" id="error_{{ forloop.counter }}_{{ field.auto_id }}">
          {{ error }}
        </div>
      {% endfor %}
    {% endif %}
    {% if field.help_text %}
      <small id="hint_{{ field.auto_id }}" class="form-text text-muted">{{ field.help_text|safe }}</small>
    {% endif %}
  </div>
</div>
{% endif %}
