diff --git a/en/appendices/5-3-migration-guide.rst b/en/appendices/5-3-migration-guide.rst index 06e4d92690..fd278d895b 100644 --- a/en/appendices/5-3-migration-guide.rst +++ b/en/appendices/5-3-migration-guide.rst @@ -154,3 +154,8 @@ View wrapping script tags (````) around inline JavaScript. This enables syntax highlighting in many editors to work. The wrapping script tag will be removed and replaced with a script tag generated by the helper. + +- :php:class:`FormHelper` now supports a new option ``nestedCheckboxAndRadio``. + By default, the helper generates inputs of type checkbox and radio nested + inside their label. Setting the ``nestedCheckboxAndRadio`` option to ``false`` + will turn off the nesting. diff --git a/en/views/helpers/form.rst b/en/views/helpers/form.rst index d180f8e250..d63d3edc8c 100644 --- a/en/views/helpers/form.rst +++ b/en/views/helpers/form.rst @@ -678,9 +678,12 @@ as well as HTML attributes. This subsection will cover the options specific to On the other hand you can set this to ``true`` for any control type to force the generated input element inside the label. If you change this for radio buttons - then you need to also modify the default - :ref:`radioWrapper` template. Depending on the generated - control type it defaults to ``true`` or ``false``. + then you might want to also modify the default :ref:`radioWrapper` + template to add a wrapping ``div``. Depending on the generated control type it + defaults to ``true`` or ``false``. + + If you want to disable the nesting of checkbox and radio inputs globally you can + set ``nestedCheckboxAndRadio`` option of ``FormHelper`` to ``false``. * ``$options['templates']`` - The templates you want to use for this input. Any specified templates will be merged on top of the already loaded templates.