#26927: Subwidgets not passed required and disabled attributes in
BoundField.__iter__()
---------------------------+--------------------------------------
Reporter: jdufresne | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------
Changes (by jdufresne):
* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0
Comment:
[https://github.com/django/django/pull/6960 PR]
I think this PR, or at least parts of it, should be considered for 1.10.
The `required` attribute is newly introduced in 1.10 with the following
concerns:
1. The
[https://docs.djangoproject.com/en/dev/ref/forms/widgets/#radioselect
documentation] about looping over subwidgets suggests the `required`
attribute will be carried over during iteration. (From this one might also
assume `disabled`.)
2. IMO more importantly, as noted in the PR, the `CheckboxSelectMultiple`
widget will behave incorrectly with the `required` attribute. When
browsers see multiple checkboxes with the same `name` attribute marked
`required` the browser requires **all** checkboxes checked instead of at
least one. This validation contradicts Django's server side validation of
requiring at least one item for multiple choice fields. This will make
Django forms using `CheckboxSelectMultiple` appear broken.
--
Ticket URL: <https://code.djangoproject.com/ticket/26927#comment:1>
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/067.da76dc5b2620683131cc81886b4f3101%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.