<div is="form-row" class="{% if field.errors -%} has-error{% endif -%}">
    {% set label_att = {'is': 'form-label', 'class': classes.label} -%}
    {% set field_att = {} -%}
    {% if field.auto_id -%}
        {% do label_att.update({'for': field.auto_id}) -%}
        {% do field_att.update({'id': field.auto_id}) -%}
    {% endif -%}
    {% if field.field.required -%}
        {% do tpl.add_css_classes_to_dict(label_att, 'required') -%}
    {% endif -%}
    <label{{ tpl.json_flatatt(label_att) }}>{{ field.label }}</label>
    <div class="field {{ classes.field }}">
        <div{{ tpl.json_flatatt(field_att) }}></div>
        <div class="input-as-select">
            {% for choice in field -%}
            <div class="{{ classes.multiple_type }}">
                <label>
                    {{ choice.tag()|safe }}
                    {{ choice.choice_label }}
                </label>
            </div>
            {% endfor -%}
            {% for error in field.errors -%}
            <div class="alert alert-warning">{{ error }}</div>
            {% endfor -%}
            {% if field.help_text -%}
            <p class="help-block">
                {{ field.help_text|safe }}
            </p>
            {% endif -%}
        </div>
    </div>
</div>
