﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34624	RelatedFieldWidgetWrapper links toggling isn’t working for radio widgets	Thibaud Colas	Coen van der Kamp	"In the Redirects contrib module, when creating a new redirect, the first field is for a Site instance. This is using a radio button (`radio_fields` ModelAdmin definition: https://github.com/django/django/blob/main/django/contrib/redirects/admin.py#L10). This uses `RelatedFieldWidgetWrapper` – which doesn’t work for radio widgets. Demo:

[[Image(https://code.djangoproject.com/raw-attachment/ticket/34624/related-links.gif)]]

If we look at [https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js#L223-L230 RelatedObjectLookups.js], it seems clear this code was only written to support `select` widgets.

Tagging this `contrib.admin` because it seems to affect all usage of `RelatedFieldWidgetWrapper` – but as far as I can see in Django itself only `contrib.redirects` uses radio_fields.

---

In this instance I believe a `select` widget would be a much nicer experience anyway, so not entirely sure whether it makes sense to change the widget to fix this, or update the code to support radio buttons, or do both."	Bug	assigned	contrib.admin	4.2	Normal				Unreviewed	0	0	0	0	0	1
