{% load custom_filters %} {% if mensajes %} {% include mensajes %} {% endif %} {% for seccion in preguntasEstudio %} {% if seccion.tipo == 'agregacion' %}
{% endif %}

{{ seccion.nombre }}

{% for elemento in seccion.elemento_set.all %} {% if elemento.tipo == 'separador' %}
{{ elemento.nombre }}
{% else %} {% with forms|hashD:elemento.id as form %}
{{ elemento.nombre }} {% if elemento.obligatorio %} * {% endif %}
{% for field in form %} {% if elemento.opcionOtro and field.label == 'Otro' %} {% elif field.label == 'Otro' %} {% else %} {% if elemento.tipo == 'opcion_multiple' or elemento.tipo == 'casillas' %}
{% for choice in field %}
{{ choice }}
{% endfor %}
{% else %}
{{ field }}
{% endif %} {% endif %}
{% if field.errors %} {% for error in field.errors %} {{ error }} {% endfor %} {% endif %}
{% endfor %}
{% for error in form.non_field_errors %} {{ error }} {% endfor %}
{% endwith %} {% endif %} {% with c=seccion.elemento_set.all|hashD:forloop.counter %} {% with cb=elemento %} {% if c.row != cb.row and c is not None %}
{% endif %} {% endwith %} {% endwith %} {% endfor %}
{% if seccion.tipo == 'agregacion' %} {% with registrosA|hashD:seccion.id as registros %}

Registros

{% for elemento in seccion.elemento_set.all %} {% endfor %} {% if registros %} {% for registro in registros %} {% for respuest in registro%} {% with respuest.getStringValue as valor %} {% endwith %} {% endfor %} {% endfor %} {% endif %}
{{elemento.nombre}}
{{ valor }}
{% endwith %}
{% else %} {% endif %} {% endfor %}