{% if errors %}
<b-notification
  type="is-danger is-light"
  aria-close-label="Close notification"
  role="alert">
  {{ errors }}
  {% if not fields %}
    {% for field in hidden_fields %}{{ field }}{% endfor %}
  {% endif %}
</b-notification>
{% endif %}
{% for field, errors in fields %}
  <b-field 
    label="{% if field.label %}{{ field.label }}{% endif %}"
    {% with classes=field.css_classes %}{% if classes %} class="{{ classes }}"{% endif %}{% endwith %} 
    label-position="{{ labelPosition }}"
    custom-class="is-small">
      {{ field }}
      {% if field.help_text %}
      <template #message>
        <span class="help">{{ field.help_text|safe }}</span>
      </template>
      {% endif %}
      {% if errors %}
      <template #message>
        <span class="help has-text-danger">
          {{ errors }}
        </span>
      </template>
      {% endif %}
      {% if forloop.last %}
        {% for field in hidden_fields %}{{ field }}{% endfor %}
      {% endif %}
  </b-field>
{% endfor %}
{% if not fields and not errors %}
  {% for field in hidden_fields %}{{ field }}{% endfor %}
{% endif %}
