{% set errors = errors | default([]) %}
<div class="select form-group {{ (errors | length > 0) ? 'has-error': '' }} {{ styleModifier|default('') }}">
<div class="{{ inputWrapperModifier|default('') }}">
{{ include('Form/Includes/form-control-label.html.twig', _context) }}
<select
name="{{ name }}"
id="{{ id }}"
class="form-control {{ (errors | length > 0 )? 'is-invalid': '' }} {{ inputModifier|default('') }}"
{{ required|default(false) ? 'required' : '' }}
{{ readonly|default(false) ? 'readonly' : '' }}
{{ disabled|default(false) ? 'disabled' : '' }}
{{ helpText | default(null) ? 'aria-describedby="' ~ id ~'-help-block"' : '' }}
{% for key, value in inputAttributes | default([]) %}
{{ key }}="{{ value }}"
{% endfor %}
>
{#FLOATING LABEL: First option needs to have NO value. For hiding it just use display: none and set it disabled and selected.#}
{% for option in options|default([]) %}
<option class="{{ option.class|default('') }}" value="{{ option.value | default('') }}"
{{ option.selected | default(false) ? 'selected': null }}
{{ option.disabled | default(false) ? 'disabled': null }}
>
{{ option.label|default('') }}
</option>
{% endfor %}
</select>
</div>
{{ include('Form/Includes/form-errors.html.twig', _context) }}
{{ include('Form/Includes/form-control-help-text.html.twig', _context) }}
</div>