#27487: Using formfield_overrides with CheckboxSelectMultiple has two problems
-----------------------------------------+------------------------
Reporter: nrogers64 | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.10
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 |
-----------------------------------------+------------------------
The following `ModelAdmin` code updates the widget, as expected:
{{{
formfield_overrides = {
ManyToManyField: {'widget': CheckboxSelectMultiple},
}
}}}
However, it has two problems:
The first problem is that it provides the little green plus sign to add
another object on the fly, but that functionality doesn't actually work
properly with the `CheckboxSelectMultiple` widget (after adding another
object, you have to refresh the page in order to see it). So I would think
that this widget shouldn't provide the little green plus sign.
The second problem might not be valid because of what I'm doing in my
project. Currently, the `<form>` in change_form.html has `novalidate`
hard-coded in:
https://github.com/django/django/blob/1.10.3/django/contrib/admin/templates/admin/change_form.html#L40
I have overridden that in my project, removing the `novalidate` attribute.
I understand that my doing that might make this second problem invalid.
The second problem is that the user has to check each of the checkboxes in
order to submit the form.
--
Ticket URL: <https://code.djangoproject.com/ticket/27487>
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/052.f9791496829d497fd20dcd497be38adc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.