Skip to content

Commit 834090d

Browse files
committed
Document changes in cakephp/cakephp#18158
1 parent 8275518 commit 834090d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ View
9393
templates using ``DELETE`` method.
9494
- ``HtmlHelper::importmap()`` was added. This method allows you to define
9595
import maps for your JavaScript files.
96+
- ``FormHelper`` now uses the ``containerClass`` template to apply a class to
97+
the form control div. The default value is ``input``.
9698

9799
Error
98100
-----

en/views/helpers/form.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,13 +376,14 @@ methods of FormHelper.
376376

377377
By default the ``control()`` method will employ the following widget templates::
378378

379-
'inputContainer' => '<div class="input {{type}}{{required}}">{{content}}</div>'
379+
'inputContainer' => '<div class="{{constainerClass}} {{type}}{{required}}">{{content}}</div>'
380380
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}>'
381381
'requiredClass' => 'required'
382+
'containerClass' => 'input'
382383

383384
In case of validation errors it will also use::
384385

385-
'inputContainerError' => '<div class="input {{type}}{{required}} error">{{content}}{{error}}</div>'
386+
'inputContainerError' => '<div class="{{containerClass}} {{type}}{{required}} error">{{content}}{{error}}</div>'
386387

387388
The type of control created (when we provide no additional options to specify the
388389
generated element type) is inferred via model introspection and

0 commit comments

Comments
 (0)