{% if edit %} {% set ruta_formulario = path(action, {'idView': detalle.idView}) %} {% else %} {% set ruta_formulario = path(action, {'idExaminando': idExaminando, 'idConcurso': idConcurso }) %} {% endif %} {{ form_start(formTerritorialidad, {'action': ruta_formulario }) }} {% set totalCheckboxes = attribute(formTerritorialidad, territorialidad)|length %} {% set half = totalCheckboxes // 2 %} {% set firstColumn = attribute(formTerritorialidad, territorialidad)[:half + (totalCheckboxes % 2)] %} {% set secondColumn = attribute(formTerritorialidad, territorialidad)[half + (totalCheckboxes % 2):] %}
Seleccione territorio/s a desistir:

{% for checkbox in firstColumn %}

{% endfor %}
{% for checkbox in secondColumn %}

{% endfor %}
{# {{form_errors(formTerritorialidad.departamentosJudiciales)}} #} {{ form_errors(attribute(formTerritorialidad, territorialidad)) }} {{ form_end(formTerritorialidad) }}