{# Note - assumes django_jsform/django_jsform.css is in use #}

{% load jsform %}

{% for field in form %}
{% if field.is_hidden %}
	{{field}}
{% else %}
<div class="block">

	{# TODO - support fields with sub-widgets (the wrapper should not be <label> #}
	<label for="{{field.id_for_label}}" class="tightlines" style="display: block;">
		{% if field.field.required %}
		<b>{{field.label}}</b>
		{% else %}
		{{field.label}} <small>(optional)</small>
		{% endif %}

		{% if field.help_text %}
		<br><small>{{field.help_text}}</small>
		{% endif %}
	</label>
	{{field|with_error_message_container}}
</div>
{% endif %}
{% endfor %}