{% set input_id = "inp-" ~ widget.path | replace('.','_') | replace('(','_') | replace(')','_') | replace(':','_') %}
<div class="rp-widget rp-choice" data-path="{{ widget.path }}" data-type="choice"
     {% if widget.enable %}data-enable='{{ widget.enable }}'{% endif %}>
    <label class="rp-label" for="{{ input_id }}" data-rp-tooltip='{{ {"desc": widget.description} | tojson }}' title="{{ widget.description }}">
        {{ widget.label or widget.id }}
    </label>
    {% if widget.description %}
    <span id="{{ input_id }}-desc" class="rp-sr-only">{{ widget.description }}</span>
    {% endif %}
    <select id="{{ input_id }}"
            class="rp-input rp-input-choice"
            name="{{ widget.path }}"
            aria-label="{{ widget.label or widget.id }}"
            {% if widget.description %}aria-describedby="{{ input_id }}-desc"{% endif %}>
        {% for opt in widget.attrs.options %}
        <option value="{{ opt.value or opt.label }}"
                {% if opt.label == widget.default or opt.value == widget.default or (widget.current and (opt.label == widget.current or opt.value == widget.current)) %}selected{% endif %}
                title="{{ opt.description }}">
            {{ opt.label or opt.value }}
        </option>
        {% endfor %}
    </select>
</div>
