{# /** * @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 classes = [ customtype == 'standard' ? 'form-control', customtype == 'custom' ? 'custom-select', ] %} {% spaceless %} {% for option in options %} {% if option.type == 'optgroup' %} {% for sub_option in option.options %} {% endfor %} {% elseif option.type == 'option' %} {% endif %} {% endfor %} {% endspaceless %}