 = "id=" + formid if formid else "" %}
<form {{idattr}} class="{% if horizontal %}form-horizontal{% endif %}" method="POST" action="{{ url }}"
    {% if confirm_msg %}onsubmit='return confirm("{{ confirm_msg }}");' {% endif %} 
    {% if form.multipart %}enctype="multipart/form-data"{% endif %} >
    {{ form.hidden_tag() }}
        {% if legend %}
        <legend>{{ legend|safe }}</legend>
        {% endif %}
        {% set focus = True %}
        {% for field in form %}
            {% if field.type != "Hid