Skip to content

Commit f99ec6b

Browse files
committed
Add info for cakephp/cakephp#18865
1 parent 2d63f82 commit f99ec6b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

en/appendices/5-3-migration-guide.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,8 @@ View
154154
wrapping script tags (``<script>...</script>``) around inline JavaScript. This
155155
enables syntax highlighting in many editors to work. The wrapping script tag
156156
will be removed and replaced with a script tag generated by the helper.
157+
158+
- :php:class:`FormHelper` now supports a new option ``nestedCheckboxAndRadio``.
159+
By default, the helper generates inputs of type checkbox and radio nested
160+
inside their label. Setting the ``nestedCheckboxAndRadio`` option to ``false``
161+
will turn off the nesting.

en/views/helpers/form.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,12 @@ as well as HTML attributes. This subsection will cover the options specific to
678678

679679
On the other hand you can set this to ``true`` for any control type to force the
680680
generated input element inside the label. If you change this for radio buttons
681-
then you need to also modify the default
682-
:ref:`radioWrapper<create-radio-button>` template. Depending on the generated
683-
control type it defaults to ``true`` or ``false``.
681+
then you might want to also modify the default :ref:`radioWrapper<create-radio-button>`
682+
template to add a wrapping ``div``. Depending on the generated control type it
683+
defaults to ``true`` or ``false``.
684+
685+
If you want to disable the nesting of checkbox and radio inputs globally you can
686+
set ``nestedCheckboxAndRadio`` option of ``FormHelper`` to ``false``.
684687

685688
* ``$options['templates']`` - The templates you want to use for this input. Any
686689
specified templates will be merged on top of the already loaded templates.

0 commit comments

Comments
 (0)