{% for field in fields %} {% if field.is_hidden %} {% else %}
{% comment %} Django-filter sometimes returns a string for the value, sometimes a list. Django doesn't surface a way to do this check in templates and this doesn't warrant a custom filter. This is a hack for now, I'm sorry. This should be replaced by a template filter that determines if the value is an iterable of strings, or an iterable of a characters (str). This assumes if the first element length == 1, we are iterating over a string (iterable of characters). So, uh, don't use field values of length 1. {% endcomment %}
{{ field.label|safe }}
{# This is filled using the FUI `activate` action on the dropdown #}
{% if field.field.has_search %}
{% endif %} {% for value, label in field.field.widget.choices %} {{ label|safe }} {% endfor %}
{% endif %} {% endfor %}