Opened 18 years ago
Closed 18 years ago
#4353 closed (fixed)
Example error in newforms section "Using forms in views and templates"
Description ¶
The second example code in "Using forms in views and templates", subsection "Complex template output" contains semantic HTML errors. The closing "dd" tags within the "if" blocks should be closing "ul" tags.
<form method="post"> <ul class="myformclass"> <li>{{ form.sender.label }} {{ form.sender.label }}</li> <li class="helptext">{{ form.sender.help_text }}</li> {% if form.sender.errors %}<ul class="errorlist">{{ form.sender.errors }}</dd>{% endif %} <li>{{ form.subject.label }} {{ form.subject.label }}</li> <li class="helptext">{{ form.subject.help_text }}</li> {% if form.subject.errors %}<ul class="errorlist">{{ form.subject.errors }}</dd>{% endif %} ... </ul> </form>
Correct:
... {% if form.sender.errors %}<ul class="errorlist">{{ form.sender.errors }}</ul>{% endif %} ... {% if form.subject.errors %}<ul class="errorlist">{{ form.subject.errors }}</ul>{% endif %}
Change History (2)
comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [5352]) Fixed #4353 -- Fixed a typo in newforms documentation. I can't believe the
documentation editor didn't spot this. Thanks, zendak.