{% capture currentform %}{{ include.form }}{% endcapture %} {% for currentpage in site.data[currentform] %} {% assign fields = currentpage.fields %} {% assign label = currentpage.title %} {% assign length = forloop.length %} {% assign percentdone = forloop.index | times: '100' | divided_by: forloop.length %}
{% comment %} Form title {% endcomment %}

{{ page.title }}

{% if length < 6 %}
Page {{ forloop.index }} of {{ length }}
{% else %} {% comment %} Progress bar {% endcomment %}
{{ percentdone }}% done
{% endif %}

{{ label | markdownify | remove: '

' | remove: '

' }}

{% if currentpage.description %} {{ currentpage.description | markdownify | improve }} {% endif %}
{% comment %} Render fields in the currentpage {% endcomment %} {% include render_field.html %} {% include pagination.html %}
{% endfor %}