#33857: using FilteredSelectMultiple widget on forms.ModelMultipleChoiceField is
not working
-------------------------------------+-------------------------------------
               Reporter:  SebaRGFSL  |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:  Forms      |        Version:  2.2
               Severity:  Normal     |       Keywords:  forms, widgets,
                                     |  ManytoMany,
           Triage Stage:             |  ModelMultipleChoiceField
  Unreviewed                         |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Hello there,
 I have a form which has a ModelMultipleChoiceField in it, that works
 correctly, but when i try to add the FilteredSelectMultiple widget from
 the admin widgets somehow the selected values are no longer in the payload
 of the POST request

 Here is the piece of code for the form field


 {{{
     class Media:
         css = {
             'all': ('/static/admin/css/widgets.css',),
         }
         js = ('/admin/jsi18n',)

     dental_codes = forms.ModelMultipleChoiceField(
         label='Select Proccedure Codes',
         queryset = CDTADACodes.objects.all(),
         widget = FilteredSelectMultiple('Dental Codes Selection',
 is_stacked=True),
         required = False
     )
 }}}

 Here is the html template


 {{{
             <div class="row justify-content-md-center">
               <div class="form-group">
                 {{form.media}}
                 {{form.dental_codes.errors}}
                 {{form.dental_codes}}
               </div>
             </div>
 }}}

 Template is correctly loaded in Front End but no values are selected when
 used. Only by commenting the widget assignment sentence the code works
 correctly.

 Any help is welcomed, thanks in advance

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33857>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182126882eb-e7c2577f-8567-4025-a44d-c2880b7e49e4-000000%40eu-central-1.amazonses.com.

Reply via email to