Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions en/appendices/5-3-migration-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,8 @@ View
wrapping script tags (``<script>...</script>``) 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.
9 changes: 6 additions & 3 deletions en/views/helpers/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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<create-radio-button>` template. Depending on the generated
control type it defaults to ``true`` or ``false``.
then you might want to also modify the default :ref:`radioWrapper<create-radio-button>`
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.
Expand Down
Loading