Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #16815 -- Rectified the code example for hidden_fields and visi…

…ble_fields in the forms documentation. Thanks, joonas.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3513234cf8a9ca0195536f7856729049adbd8444 1 parent c76112c
Julien Phalip jphalip authored
Showing with 5 additions and 8 deletions.
  1. +5 −8 docs/topics/forms/index.txt
13 docs/topics/forms/index.txt
View
@@ -333,16 +333,13 @@ and visible fields independently: ``hidden_fields()`` and
these two methods::
<form action="/contact/" method="post">
+ {# Include the hidden fields #}
+ {% for hidden in form.hidden_fields %}
+ {{ hidden }}
+ {% endfor %}
+ {# Include the visible fields #}
{% for field in form.visible_fields %}
<div class="fieldWrapper">
-
- {# 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 }}
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.