{#def field, options #}

{% do attrs.set(name=field.name, value=field.value) %}
{% if field.error %}
  {% do attrs.set(invalid=field.error.msg) %}
{% endif %}

<ui:Select __attrs={{attrs}}>
{%- for opval, oplabel in options %}
  <option value="{{ opval }}"
  {% if
    (field.is_multiple and opval in field.value)
    or (not field.is_multiple and opval == field.value)
  %} checked{% endif -%}
  >{{ oplabel }} </option>
{%- endfor %}
</ui:Select>
