{% load i18n %}

<select onchange ="document.getElementById('{{selectimageid}}').src=this.options[this.selectedIndex].title" {{ finalattrs|safe }}>
    {% for id, urls in choices %}
        {% with id|stringformat:"s" as idstring %}
            {% ifequal id currentvalue %}
                <option value="{{ id }}" title="{{urls.image}}" selected="selected">{{urls.name}}</option>
            {% else %}
                <option value="{{ id }}" title="{{urls.image}}">{{urls.name}}</option>
            {% endifequal %}
        {% endwith %}
    {% endfor %}
</select>
