{% 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):] %}
{% endfor %}
{% endfor %}