Opened 5 days ago

Last modified 4 days ago

#36053 assigned Bug

FilteredSelectMultiple label to the right of widget on a ModelMultipleChoiceField

Reported by: Harsh Malviya Owned by: Chaitanya Rahalkar
Component: contrib.admin Version: 5.0
Severity: Normal Keywords: css, forms, widget, filter, selectmultiple, django, admin
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description

Description:
I am using a django forms widget FilteredSelectMultiple, It seems the CSS for the same is not on the right place. It's showing the label of the widget to the right side.

P.S. This is only happening in the Django Versions >= 5.0, For lower versions than 5.0 it's working fine i.e Django==4.2.17

Code Snippet:

from django import forms
from models import Address
from django.contrib.admin.widgets import FilteredSelectMultiple

class UserForm(forms.ModelForm):
    address = forms.ModelMultipleChoiceField(
        queryset= Address.objects.all(),
        widget=FilteredSelectMultiple("Address", is_stacked=False),
        required=False
    )

Please check the attached images for different versions:

Requisite:
Django Version: 5.1.4
Python Version: 3.11.10
Operating System: macOS
Django Installation Method: pip install Django

Attachments (2)

image.png (66.9 KB ) - added by Harsh Malviya 5 days ago.
image.2.png (66.3 KB ) - added by Harsh Malviya 5 days ago.

Download all attachments as: .zip

Change History (5)

by Harsh Malviya, 5 days ago

Attachment: image.png added

by Harsh Malviya, 5 days ago

Attachment: image.2.png added

comment:1 by Chaitanya Rahalkar, 5 days ago

Owner: set to Chaitanya Rahalkar
Status: newassigned

comment:2 by Sarah Boyce, 4 days ago

Component: Formscontrib.admin
Summary: Django Admin Widget FilteredSelectMultiple CSS Not WorkingFilteredSelectMultiple label to the right of widget on a ModelMultipleChoiceField
Triage Stage: UnreviewedAccepted

Replicated, thank you for the report!

comment:3 by Sarah Boyce, 4 days ago

Version: 5.15.0
Note: See TracTickets for help on using tickets.
Back to Top