#28733: Formsets are missing classes to be easily styleable
----------------------------------------+------------------------
               Reporter:  Claude Paroz  |          Owner:  nobody
                   Type:  New feature   |         Status:  new
              Component:  Forms         |        Version:  master
               Severity:  Normal        |       Keywords:
           Triage Stage:  Unreviewed    |      Has patch:  0
    Needs documentation:  0             |    Needs tests:  0
Patch needs improvement:  0             |  Easy pickings:  0
                  UI/UX:  0             |
----------------------------------------+------------------------
 With normal forms, it's easy to style widgets with CSS thanks to unique
 input ids (`input#id_field_name` selector).

 With formsets, as ids contain an index number, you cannot use the same
 strategy. To add some class to some field widget, you have to customize
 the formset form to add a custom widget to be able to specify an
 `attrs={'class': 'special'})` parameter, which is much boilerplate code
 for a very common and simple addition.

 I would suggest to automatically add `class="fieldname"` on each formset
 widget.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28733>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.4fed9af2fd7efa21543df883ceba09d9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to