{# def field #}
{% do attrs.setdefault(id=field.id, type="checkbox", value=field._value()) %}
<span class="form-switch">
  <input {{ attrs.render(class="form-check-input", name=field.name, checked=True if field.checked | d(field.data) else False, switch=True) }}>
</span>
