diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt index 234417bf00cf7..5b6f87fbec791 100644 --- a/docs/topics/forms/index.txt +++ b/docs/topics/forms/index.txt @@ -333,16 +333,13 @@ and visible fields independently: ``hidden_fields()`` and these two methods::
+ {# Include the hidden fields #} + {% for hidden in form.hidden_fields %} + {{ hidden }} + {% endfor %} + {# Include the visible fields #} {% for field in form.visible_fields %}
- - {# Include the hidden fields in the form #} - {% if forloop.first %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - {% endif %} - {{ field.errors }} {{ field.label_tag }}: {{ field }}