Refs #32339 -- Added use_fieldset to Widget.

This commit is contained in:
David 2022-01-13 23:08:38 +00:00 committed by Carlton Gibson
parent 04ad0f26ba
commit c8459708a7
28 changed files with 489 additions and 22 deletions

View file

@ -315,6 +315,19 @@ foundation for custom widgets.
``<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.
.. attribute:: Widget.use_fieldset
.. versionadded:: 4.1
An attribute to identify if the widget should be grouped in a
``<fieldset>`` with a ``<legend>`` when rendered. Defaults to ``False``
but is ``True`` when the widget contains multiple ``<input>`` tags such as
:class:`~django.forms.CheckboxSelectMultiple`,
:class:`~django.forms.RadioSelect`,
:class:`~django.forms.MultiWidget`,
:class:`~django.forms.SplitDateTimeWidget`, and
:class:`~django.forms.SelectDateWidget`.
.. method:: use_required_attribute(initial)
Given a form field's ``initial`` value, returns whether or not the