<form class="row g-3" id="liste-filter"
      hx-get=""
      hx-params="*"
      hx-trigger="change"
      hx-push-url="true" 
      hx-swap="innerHTML" 
      hx-target="body">

  {% for f in filter_config  %}
  
  {% if f.filter_type != 'hidden' %}
  <div class="col-md-{{ f.width }}">
    <label for="{{ f.name }}" class="form-label">{{ f.text }}</label>
    {% if f.filter_type == 'select' %}
    <select id="{{ f.name }}" name="{{ f.name }}" class="form-select">
        <option value="">-</option>
      {% for key, value in f.options.items() %}
        {% if key == f.current_value %}
        <option value="{{ key }}" selected>{{ value }}</option>
        {% else %}
        <option value="{{ key }}">{{ value }}</option>
        {% endif %}
      {% endfor %}
    </select>
    {% elif f.filter_type == 'date' %}
    <input type="date" class="form-control" id="{{ f.name }}" name="{{ f.name }}" value="{{ f.current_value|date_format2 }}">
    {% else %}
    <input type="text" class="form-control" id="{{ f.name }}" name="{{ f.name }}" value="{{ f.current_value }}">
    {% endif %}
  </div>
  {% endif %}

  {% endfor %}

</form>

<br>