#4353: Example error in newforms section "Using forms in views and templates"
-----------------------+----------------------------------------------------
Reporter:  zendak      |       Owner:  jacob        
  Status:  new         |   Component:  Documentation
 Version:  SVN         |    Keywords:  newforms     
   Stage:  Unreviewed  |   Has_patch:  0            
-----------------------+----------------------------------------------------
 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 %}
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4353>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to