{% load phoxtail_design_tags %} {% comment %} Choice Dropdown Widget (MD3 outlined field + menu panel) ======================================================== Exposed dropdown for a plain ChoiceField/TypedChoiceField with a small, static set of options (not a remote-search queryset) — the same outlined anatomy as single_select_search, minus the search bar. A choice dropdown always renders a selection, so the label is permanently floated (fw-md3-outlined--floated) like a native select's. Required context: - field: bound ChoiceField/TypedChoiceField Optional context: - hx_get/hx_target/hx_swap/hx_trigger/hx_include/hx_vals: forwarded to the underlying (visually hidden) {% for value, choice_label in choices %} {% endfor %}
{% for value, choice_label in choices %} {% if not forloop.first %}
{% endif %} {% endfor %}
{% endwith %} {% if show_label != False and label != "" %} {% endif %} {% if field.errors %}
{% for error in field.errors %}{{ error }}{% endfor %}
{% elif show_help_text != False and help_text|default:field.help_text %}
{{ help_text|default:field.help_text }}
{% endif %} {% endwith %}