{# Only the selected option is rendered; the rest comes from the AJAX search. #} {% for name, value in widget.attrs.items %}{% if name == "selected" %}{% endif %}{% endfor %}