#28672: CheckboxSelectMultiple does not correctly bind to the form attribute 
passed
in when rendered outside its containing form
---------------------------------------+------------------------
               Reporter:  Dylan Young  |          Owner:  nobody
                   Type:  Bug          |         Status:  new
              Component:  Forms        |        Version:  1.8
               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            |
---------------------------------------+------------------------
 This means that POSTing the form does not submit the accompanying selected
 data.

 This seems to be an issue with `attrs={'form': 'theform'}` not being
 passed through to the underlying checkbox inputs.

 SelectMultiple behaves as expected (submitting with the form).

 Minimal (inefficient) Example (must be included on a page with a form
 named 'theform' to see the problematic POST):


 {{{
 class UserSelectForm(Form):
     selected_users = MultipleChoiceField(
                     choices=User.objects.all()[0:4],
                     initial=User.objects.all()[0:4],
                     widget=SelectMultiple(attrs={'form': 'theform'}),
                     required=True)
 }}}

 Not sure if this is fixed in Django>1.8

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28672>
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/053.b93c68b267ba191a764c2daaf56f05ba%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to