Skip to content

Commit 59e8aa5

Browse files
authored
Update form.rst (#7904)
Update the document to reflect that `/` has been removed from the input. Reference: cakephp/cakephp@e0cbb00
1 parent 1855354 commit 59e8aa5

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

en/views/helpers/form.rst

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Output:
101101
.. code-block:: html
102102

103103
<form method="post" action="/articles/edit/5">
104-
<input type="hidden" name="_method" value="PUT" />
104+
<input type="hidden" name="_method" value="PUT">
105105

106106
.. note::
107107

@@ -377,7 +377,7 @@ methods of FormHelper.
377377
By default the ``control()`` method will employ the following widget templates::
378378

379379
'inputContainer' => '<div class="input {{type}}{{required}}">{{content}}</div>'
380-
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}/>'
380+
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}>'
381381
'requiredClass' => 'required'
382382

383383
In case of validation errors it will also use::
@@ -567,11 +567,11 @@ as well as HTML attributes. This subsection will cover the options specific to
567567

568568
<div class="input file">
569569
<label for="field">Field</label>
570-
<input type="file" name="field" value="" id="field" />
570+
<input type="file" name="field" value="" id="field">
571571
</div>
572572
<div class="input email">
573573
<label for="email">Email</label>
574-
<input type="email" name="email" value="" id="email" />
574+
<input type="email" name="email" value="" id="email">
575575
</div>
576576

577577
* ``$options['label']`` - Either a string caption or an array of
@@ -591,7 +591,7 @@ as well as HTML attributes. This subsection will cover the options specific to
591591

592592
<div class="input">
593593
<label for="name">The User Alias</label>
594-
<input name="name" type="text" value="" id="name" />
594+
<input name="name" type="text" value="" id="name">
595595
</div>
596596

597597
Alternatively, set this key to ``false`` to disable the generation of the
@@ -606,7 +606,7 @@ as well as HTML attributes. This subsection will cover the options specific to
606606
.. code-block:: html
607607

608608
<div class="input">
609-
<input name="name" type="text" value="" id="name" />
609+
<input name="name" type="text" value="" id="name">
610610
</div>
611611

612612
If the label is disabled, and a ``placeholder`` attribute is provided, the
@@ -631,7 +631,7 @@ as well as HTML attributes. This subsection will cover the options specific to
631631

632632
<div class="input">
633633
<label for="name" class="thingy">The User Alias</label>
634-
<input name="name" type="text" value="" id="name" />
634+
<input name="name" type="text" value="" id="name">
635635
</div>
636636

637637
* ``$options['options']`` - You can provide in here an array containing
@@ -830,7 +830,7 @@ Will output:
830830

831831
.. code-block:: html
832832

833-
<input name="id" type="hidden" />
833+
<input name="id" type="hidden">
834834

835835
Creating Textareas
836836
------------------
@@ -987,8 +987,8 @@ methods are described in each method's own section.)
987987

988988
.. code-block:: html
989989

990-
<input type="hidden" name="published" value="0" />
991-
<input type="checkbox" name="published" value="1" />
990+
<input type="hidden" name="published" value="0">
991+
<input type="checkbox" name="published" value="1">
992992

993993
This can be disabled by setting ``'hiddenField'`` to ``false``::
994994

@@ -1011,34 +1011,34 @@ methods are described in each method's own section.)
10111011
.. code-block:: html
10121012

10131013
<h2>Primary Colors</h2>
1014-
<input type="hidden" name="color" value="0" />
1014+
<input type="hidden" name="color" value="0">
10151015
<label for="color-red">
1016-
<input type="checkbox" name="color[]" value="5" id="color-red" />
1016+
<input type="checkbox" name="color[]" value="5" id="color-red">
10171017
Red
10181018
</label>
10191019

10201020
<label for="color-blue">
1021-
<input type="checkbox" name="color[]" value="5" id="color-blue" />
1021+
<input type="checkbox" name="color[]" value="5" id="color-blue">
10221022
Blue
10231023
</label>
10241024

10251025
<label for="color-yellow">
1026-
<input type="checkbox" name="color[]" value="5" id="color-yellow" />
1026+
<input type="checkbox" name="color[]" value="5" id="color-yellow">
10271027
Yellow
10281028
</label>
10291029

10301030
<h2>Tertiary Colors</h2>
1031-
<input type="hidden" name="color" value="0" />
1031+
<input type="hidden" name="color" value="0">
10321032
<label for="color-green">
1033-
<input type="checkbox" name="color[]" value="5" id="color-green" />
1033+
<input type="checkbox" name="color[]" value="5" id="color-green">
10341034
Green
10351035
</label>
10361036
<label for="color-purple">
1037-
<input type="checkbox" name="color[]" value="5" id="color-purple" />
1037+
<input type="checkbox" name="color[]" value="5" id="color-purple">
10381038
Purple
10391039
</label>
10401040
<label for="color-orange">
1041-
<input type="checkbox" name="color[]" value="5" id="color-orange" />
1041+
<input type="checkbox" name="color[]" value="5" id="color-orange">
10421042
Orange
10431043
</label>
10441044

@@ -1612,7 +1612,7 @@ Output:
16121612

16131613
.. code-block:: html
16141614

1615-
<input type="datetime-local" name="registered" />
1615+
<input type="datetime-local" name="registered">
16161616

16171617
The value for the input can be any valid datetime string or ``DateTime`` instance.
16181618

@@ -1624,7 +1624,7 @@ Output:
16241624

16251625
.. code-block:: html
16261626

1627-
<input type="datetime-local" name="registered" value="2019-02-08T18:20:10" />
1627+
<input type="datetime-local" name="registered" value="2019-02-08T18:20:10">
16281628

16291629
Creating Date Controls
16301630
~~~~~~~~~~~~~~~~~~~~~~
@@ -1646,7 +1646,7 @@ Output:
16461646

16471647
.. code-block:: html
16481648

1649-
<input type="date" name="registered" />
1649+
<input type="date" name="registered">
16501650

16511651
Creating Time Controls
16521652
~~~~~~~~~~~~~~~~~~~~~~
@@ -1668,7 +1668,7 @@ Output:
16681668

16691669
.. code-block:: html
16701670

1671-
<input type="time" name="released" />
1671+
<input type="time" name="released">
16721672

16731673
Creating Month Controls
16741674
~~~~~~~~~~~~~~~~~~~~~~~
@@ -1690,7 +1690,7 @@ Will output:
16901690

16911691
.. code-block:: html
16921692

1693-
<input type="month" name="mob" />
1693+
<input type="month" name="mob">
16941694

16951695
Creating Year Controls
16961696
~~~~~~~~~~~~~~~~~~~~~~
@@ -1877,7 +1877,7 @@ the field's required and notBlank validation rules will be used in lieu of the d
18771877
browser HTML5 required messages. Enabling the option will add the ``onvalid`` and ``oninvalid``
18781878
event attributes to your fields, for example::
18791879

1880-
<input type="text" name="field" required onvalid="this.setCustomValidity('')" oninvalid="this.setCustomValidity('Custom notBlank message')" />
1880+
<input type="text" name="field" required onvalid="this.setCustomValidity('')" oninvalid="this.setCustomValidity('Custom notBlank message')">
18811881

18821882
If you want to manually set those events with custom JavaScript, you can set the ``autoSetCustomValidity``
18831883
option to ``false`` and use the special ``customValidityMessage`` template variable instead. This
@@ -1917,7 +1917,7 @@ relative to *webroot/img*.
19171917

19181918
By default it will use the following widget templates::
19191919

1920-
'inputSubmit' => '<input type="{{type}}"{{attrs}}/>'
1920+
'inputSubmit' => '<input type="{{type}}"{{attrs}}>'
19211921
'submitContainer' => '<div class="submit">{{content}}</div>'
19221922

19231923
**Options for Submit**

0 commit comments

Comments
 (0)