AthensFramework/core

View on GitHub
templates/field/multiple-choice.twig

Summary

Maintainability
Test Coverage
<span {% if id %}id="{{ id }}"{% endif %} class="multiple-choice-field {{ classes|join(' ') }}" {{ data|writedata|raw }} {{ initial|length }}>
    <select class="form-control"  name="{{ slug }}[]" multiple>
        {% for choiceSlug, choice in choices %}
            <option value="{{ choiceSlug }}" {{ choice.getData|writedata|raw }} {% if choice.getValue in initial %}selected{% endif %}> {{ choice.getValue }} </option>
        {% endfor %}
    </select>
</span>
{% include "field/errors.twig" %}