mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #27993 -- Fixed model form default fallback for SelectMultiple.
This commit is contained in:
parent
a0d29a9abe
commit
7d1e237753
6 changed files with 42 additions and 10 deletions
|
@ -297,11 +297,12 @@ foundation for custom widgets.
|
|||
The method's result affects whether or not a field in a model form
|
||||
:ref:`falls back to its default <topics-modelform-save>`.
|
||||
|
||||
Special cases are :class:`~django.forms.CheckboxInput` and
|
||||
:class:`~django.forms.CheckboxSelectMultiple`, which always return
|
||||
``False`` because an unchecked checkbox doesn't appear in the data of
|
||||
an HTML form submission, so it's unknown whether or not the user
|
||||
actually submitted a value.
|
||||
Special cases are :class:`~django.forms.CheckboxInput`,
|
||||
:class:`~django.forms.CheckboxSelectMultiple`, and
|
||||
:class:`~django.forms.SelectMultiple`, which always return
|
||||
``False`` because an unchecked checkbox and unselected
|
||||
``<select multiple>`` don't appear in the data of an HTML form
|
||||
submission, so it's unknown whether or not the user submitted a value.
|
||||
|
||||
.. method:: use_required_attribute(initial)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue