diff options
| author | Tim Graham <timograham@gmail.com> | 2016-03-17 12:45:23 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-03-19 18:40:28 -0400 |
| commit | 379bab354472b882fed250d0dceb73644d52e220 (patch) | |
| tree | 0abab84118644350999189a7ce14249f49cabe3c /docs/ref/forms | |
| parent | 4e8c26531925227872ce29bc0cdee3329be4a216 (diff) | |
[1.9.x] Fixed #26265 -- Clarified RadioSelect container's HTML id.
Backport of 53e8ab580f7c0fcfc589ba0b1b6cc2556080e0b2 from master
Diffstat (limited to 'docs/ref/forms')
| -rw-r--r-- | docs/ref/forms/api.txt | 5 | ||||
| -rw-r--r-- | docs/ref/forms/widgets.txt | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt index 072525ff53..94ecd2b5cc 100644 --- a/docs/ref/forms/api.txt +++ b/docs/ref/forms/api.txt @@ -835,6 +835,11 @@ The field-specific output honors the form object's ``auto_id`` setting:: Attributes of ``BoundField`` ---------------------------- +.. attribute:: BoundField.auto_id + + The HTML ID attribute for this ``BoundField``. Returns an empty string + if :attr:`Form.auto_id` is ``False``. + .. attribute:: BoundField.data This property returns the data for this :class:`~django.forms.BoundField` diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index 9504d64f14..ba4c1becf9 100644 --- a/docs/ref/forms/widgets.txt +++ b/docs/ref/forms/widgets.txt @@ -682,8 +682,8 @@ Selector and checkbox widgets simply includes ``{{ myform.beatles }}`` -- they'll be output in a ``<ul>`` with ``<li>`` tags, as above. - The outer ``<ul>`` container will receive the ``id`` attribute defined on - the widget. + The outer ``<ul>`` container receives the ``id`` attribute of the widget, + if defined, or :attr:`BoundField.auto_id` otherwise. When looping over the radio buttons, the ``label`` and ``input`` tags include ``for`` and ``id`` attributes, respectively. Each radio button has an @@ -704,8 +704,8 @@ Selector and checkbox widgets ... </ul> - The outer ``<ul>`` container will receive the ``id`` attribute defined on - the widget. + The outer ``<ul>`` container receives the ``id`` attribute of the widget, + if defined, or :attr:`BoundField.auto_id` otherwise. Like :class:`RadioSelect`, you can now loop over the individual checkboxes making up the lists. See the documentation of :class:`RadioSelect` for more details. |
