#28712: Add ability to apply separate attributes to ChoiceWidget options
-------------------------------------------+------------------------------
               Reporter:  Stephen Swatman  |          Owner:  nobody
                   Type:  New feature      |         Status:  new
              Component:  Forms            |        Version:  master
               Severity:  Normal           |       Keywords:  ChoiceWidget
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  1
                  UI/UX:  0                |
-------------------------------------------+------------------------------
 For `ChoiceWidget` objects the list of options is created in the
 `create_option` method. Currently, options created by this method can
 either inherit attributes from the parent widget or have no attributes at
 all but there is no way to separately assign attributes to options as far
 as I am aware. I would like to suggest introducing the ability to specify
 separate option attributes in the `ChoiceWidget` constructor which are
 applied only to the options in that widget.

 Even more powerful would be the ability to pass callables as attribute
 values which could dynamically compute attributes based on option
 attributes such as names and values.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28712>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.3d84e969fee6c8b36ac541a73ccc11c4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to