{# Sélecteur recherchable pour un champ de formulaire — réutilise le menu recherchable de Planning (filtrage data-project-search-*). Pose un input caché `name`. Variables : name, options (list de {id, label}), selected (id|null), placeholder, noneLabel. #} {% set selectedLabel = noneLabel|default('—') %} {% for opt in options %}{% if opt.id == selected %}{% set selectedLabel = opt.label %}{% endif %}{% endfor %}
{{ selectedLabel }}
{% for opt in options %} {% endfor %}