{% use "form_div_layout.html.twig" %}

{% block form_row %}
{% spaceless %}
    <tr>
        <td>
            {{ form_label(form) }}
        </td>
        <td>
            {{ form_errors(form) }}
            {{ form_widget(form) }}
        </td>
    </tr>
{% endspaceless %}
{% endblock form_row %}

{% block hidden_row %}
{% spaceless %}
    <tr style="display: none">
        <td colspan="2">
            {{ form_widget(form) }}
        </td>
    </tr>
{% endspaceless %}
{% endblock hidden_row %}

{% block form_widget_compound %}
{% spaceless %}
    <table {{ block('widget_container_attributes') }}>
        {% if form.parent is empty and errors|length > 0 %}
        <tr>
            <td colspan="2">
                {{ form_errors(form) }}
            </td>
        </tr>
        {% endif %}
        {{ block('form_rows') }}
        {{ form_rest(form) }}
    </table>
{% endspaceless %}
{% endblock form_widget_compound %}
