{% for key in form_data %}

{{key}}

{% for z in data[key][showbar]%} {% if z.endswith("jpg") or z.endswith("jpeg") or z.endswith("png") or z.endswith("JPG") or z.endswith("JPEG") %} {% elif z.endswith("tif")%} {% else %}

{{z|safe}}

{% endif %} {% endfor %} {% for z in data[key][box]%} {% if z.endswith("jpg") or z.endswith("jpeg") or z.endswith("png") or z.endswith("JPG") or z.endswith("JPEG") %} {% elif z.endswith("tif")%} {% else %}

{{z|safe}}

{% endif %} {% endfor %}
{% endfor %}