{# /** * @file * Theme override for a select form element. * This is it's own template to accomidate materializecss JS which requires specific HTML structure to work correctly * * @see template_preprocess_form_element() * @see form-element.html.twig for more variables */ #} {% set classes = [ 'js-form-item', 'form-item', 'js-form-type-' ~ type|clean_class, 'form-type-' ~ type|clean_class, 'js-form-item-' ~ name|clean_class, 'form-item-' ~ name|clean_class, select_default == 'false' ? 'input-field', select_default ? 'input-field-browser-default', label_display == 'none' ? 'form-no-label', label_display in ['after', 'before'] ? 'form-has-label', disabled == 'disabled' ? 'form-disabled', prefix and not suffix ? 'has-prefix', suffix and not prefix ? 'has-suffix', prefix and suffix ? 'has-prefix-and-suffix', errors ? 'form-item--error', children matches '/value="[^"]+"/' ? 'has-initial-content', children matches '/placeholder="[^"]+"/' ? 'has-placeholder', description_display == 'after' ? 'has-description-after', ] %}