{% load i18n phoxtail_design_tags %} {# Single select: MD3-field trigger opens a panel with search bar + items inside. #} {# The floating label and outline live in the parent template (outside this #} {# swap target); the empty trigger shows nothing while closed — the resting #} {# label communicates the field. trigger_placeholder, when given, is only #} {# revealed while the panel is open (CSS), replacing the old hardcoded #} {# "Select remote" default. #} {% with wid=widget_id|default:field.html_name %}
{# Hidden input for form submission — its presence also drives the label float (CSS :has) #}
{% if selected_item and is_active != False %} {% endif %}
{# Field-shaped trigger — div so the clear button can nest inside without invalid HTML #} {# Dropdown panel — hidden by default, toggled by trigger #}
{% include 'phoxtail_core/forms/widgets/htmx/single_select_search/results_content.html' with widget_id=wid %}
{% endwith %}