{# /** * @file * Theme override for a select element. * * Available variables: * - attributes: HTML attributes for the select tag. * - options: The option element children. * * @see template_preprocess_select() */ #} {% set removeClasses = [ 'form-select', 'required', ] %} {% set addClasses = [ 'form-item__select', required ? 'is-required', ] %} {% for option in options %} {% if option.type == 'optgroup' %} {% for sub_option in option.options %} {% endfor %} {% elseif option.type == 'option' %} {% if option.label == "- Select -" %} {% else %} {% endif %} {% endif %} {% endfor %}