<div class="mb-4">
  <div class="form-check">
    <input
      value="true"
      type="checkbox"
      id="{{ field.name }}"
      name="{{ field.name }}"
      {% if field.value %}checked{% endif %}
      {% if field.required %}required{% endif %}
      class="form-check-input {% if field.errors %}is-invalid{% endif %}"
    />

    {% if field.label %}
      <label
        for="{{ field.name }}"
        class="form-check-label{% if style.hide_label %} sr-only{% endif %}"
      >
        {{ field.label }}
        {% if field.required %}<span class="text-danger">*</span>{% endif %}
      </label>
    {% endif %}

    {% if field.help_text %}
      <small class="d-block text-muted">{{ field.help_text|safe }}</small>
    {% endif %}

    {% if field.errors %}
      <div class="mt-3"></div>
      {% for error in field.errors %}
        <div role="alert" class="alert alert-danger mb-3">
          <p class="mb-0">{{ error }}</p>
        </div>
      {% endfor %}
    {% endif %}
  </div>
</div>
