#6877: "form.label_for tag" should apply "label_suffix"
---------------------------------------------------------------+------------
          Reporter:  David Piccione <run4yourli...@gmail.com>  |         Owner: 
 nobody                 
            Status:  new                                       |     Milestone: 
                        
         Component:  Forms                                     |       Version: 
 SVN                    
        Resolution:                                            |      Keywords: 
 label_tag, label_suffix
             Stage:  Design decision needed                    |     Has_patch: 
 1                      
        Needs_docs:  1                                         |   Needs_tests: 
 1                      
Needs_better_patch:  0                                         |  
---------------------------------------------------------------+------------
Comment (by jsdalton):

 I'm not sure it's a bug either, but it's a behavioral inconsistency that
 does cause real problems:

   * When rendering an entire form, the label_suffix appears *within* the
 label element. When you use label_tag and add a suffix by hand in the
 template, the suffix appears *after* the label element. This can cause
 problems on the design side. For example, if you have a style that adds an
 asterisk at the end of a label, the label will appear after the suffix
 when rendering the whole form and before the suffix when rendering the
 label via label_tag.
   * There's logic related to the handing of the label_suffix in the
 _html_output() method of a Form that suppresses the suffix if the last
 char of the label is in ':?.!'. You lose that feature if you use
 label_tag.

 To me the benefit of these features related to form field rendering is
 that you can drop down into a form and easily tweak a few things by hand
 if for some the default rendering isn't working for you. This one minor
 inconsistency has actually prevented me from being able to do that on
 several projects, so minor as it is it has real implications.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/6877#comment:6>
Django <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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to