summaryrefslogtreecommitdiff
path: root/docs/ref/forms
diff options
context:
space:
mode:
authorDavid <smithdc@gmail.com>2022-01-13 23:08:38 +0000
committerCarlton Gibson <carlton@noumenal.es>2022-03-30 16:28:14 +0200
commitc8459708a7e0a2474255b77d0f104a7f16e8b32c (patch)
treeadd60b1d21cfaa37e51c116348054e71c91f73a1 /docs/ref/forms
parent04ad0f26ba4b8c79dc311e1789457e0c4d1b8832 (diff)
Refs #32339 -- Added use_fieldset to Widget.
Diffstat (limited to 'docs/ref/forms')
-rw-r--r--docs/ref/forms/api.txt6
-rw-r--r--docs/ref/forms/widgets.txt13
2 files changed, 19 insertions, 0 deletions
diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt
index e092a2f59e..4d3cf8997d 100644
--- a/docs/ref/forms/api.txt
+++ b/docs/ref/forms/api.txt
@@ -1160,6 +1160,12 @@ Attributes of ``BoundField``
>>> print(f['message'].name)
message
+.. attribute:: BoundField.use_fieldset
+
+ .. versionadded:: 4.1
+
+ Returns the value of this BoundField widget's ``use_fieldset`` attribute.
+
.. attribute:: BoundField.widget_type
Returns the lowercased class name of the wrapped field's widget, with any
diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt
index 970e30456c..e0f175af79 100644
--- a/docs/ref/forms/widgets.txt
+++ b/docs/ref/forms/widgets.txt
@@ -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