select
Information
- Folder
src/components/elements/form-elements/select
Files
Schema
Mocks
Template
// src/components/elements/form-elements/select/select.twig
{% set additional_attributes_string %}
{% for attribute in additional_attributes %}
{{ attribute[0] }}="{{ attribute[1] }}"
{% endfor %}
{% endset %}
<select id="{{ id }}" name="{{ name }}" class="Input Input--select {{ classes|join(" ") }}" {% if disabled %}disabled{% endif %} {% if required %}required{% endif %} {% if invalid %}aria-invalid="true"{% endif %} {{ additional_attributes_string|raw }}>
{% for option in options %}
<option value="{{ option.value }}"{% if option.selected %}selected{% endif %}>{{ option.label }}</option>
{% endfor %}
</select>
Error: schema is invalid: data/properties must be object