{#
 # This file is part of the CRUDlex package.
 #
 # (c) Philip Lehmann-Böhm <philip@philiplb.de>
 #
 # For the full copyright and license information, please view the LICENSE
 # file that was distributed with this source code.
 #}

{% include crud.getTemplate('template', 'fieldLabel', crudEntity) with {
    field: field,
    definition: crudData.getDefinition(),
    annotations: annotations
} only %}
<select class="form-control" id="{{ field }}" name="{{ fieldNamePrefix ~ field }}">
    <option value=""></option>
    {% set values = crudData.getDefinition().getField(field, 'items') %}
    {% for setValue in values %}
        <option value="{{ setValue }}" {% if value and setValue == value %}selected="selected" {% endif %}>{{ setValue }}</option>
    {% endfor %}
</select>
