<form class="form-inline" action="${form.action or '.'}" {% attrib enctype=form.enctype, class=form.class %} method="post">
    {% if form.legend %}<legend>${form.legend}</legend>{% endif %}
    {%- if form.error %}
    <div class="alert alert-danger">${form.error}</div>
    {%- elif form.errors %}
    <div class="alert alert-danger">There are errors in the form, please check below.</div>
    {%- endif %}

    {%- for field in form.content.sections.fields %}
    {%- if field.visible %}
        <div class="form-group{% if field.errors %} has-error{% endif %}">
            {%- if field.label %}
            <label class="sr-only" for="${field.id}">${field.label}</label>
            {%- endif %}
            {%- render field set style="simple" %}
        </div>
    {%- else %}
        {%- render field set style="simple" %}
    {%- endif %}
    {%- endfor %}
</form>
