Opened 3 weeks ago

Closed 2 weeks ago

#36932 closed Bug (needsinfo)

Admin renders label after widget for non-model form fields when using FilteredSelectMultiple

Reported by: Jacob Johnson Owned by:
Component: Uncategorized Version: 5.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm a developer for Tethys Platform, an open source earth science web development platform based on Django.

When adding non-model ModelMultipleChoiceFields dynamically to a ModelAdmin form (e.g., via a custom form or get_form()), Django admin renders the widget before the label when the field uses FilteredSelectMultiple as its widget. I've tested this in versions 5.2.9 and 5.2.11 with the same behavior.

I have found that as soon as i place {{ field.field}} (line 24 in fieldset.html), inside a div container, the template renders as expected, with the label coming before the widget.

Change History (2)

comment:1 by Jacob Johnson, 3 weeks ago

Type: UncategorizedBug

comment:2 by Jacob Walls, 2 weeks ago

Resolution: needsinfo
Status: newclosed

Hi, thanks for the report.

  • I'm not sure what "non-model ModelMultipleChoiceField" refers to here.
  • Can you reproduce on main? 5.2 is in extended support and doesn't receive UI tweaks.
  • Further, #34643 is ready for checkin and will merge this week, most likely, so it is worth rechecking the behavior after that.

You can reopen if you provide enough information to reproduce the issue. Thanks.

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