Skip to content

Commit 49a33c6

Browse files
Removing self-closing slash from <input>
1 parent 207605b commit 49a33c6

File tree

12 files changed

+25
-25
lines changed

12 files changed

+25
-25
lines changed

components/dom_crawler.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -535,12 +535,12 @@ To work with multi-dimensional fields:
535535
.. code-block:: html
536536

537537
<form>
538-
<input name="multi[]"/>
539-
<input name="multi[]"/>
540-
<input name="multi[dimensional]"/>
541-
<input name="multi[dimensional][]" value="1"/>
542-
<input name="multi[dimensional][]" value="2"/>
543-
<input name="multi[dimensional][]" value="3"/>
538+
<input name="multi[]">
539+
<input name="multi[]">
540+
<input name="multi[dimensional]">
541+
<input name="multi[dimensional][]" value="1">
542+
<input name="multi[dimensional][]" value="2">
543+
<input name="multi[dimensional][]" value="3">
544544
</form>
545545

546546
Pass an array of values::

components/form.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ done by passing a special form "view" object to your template (notice the
507507
{{ form_start(form) }}
508508
{{ form_widget(form) }}
509509

510-
<input type="submit"/>
510+
<input type="submit">
511511
{{ form_end(form) }}
512512

513513
.. image:: /_images/form/simple-form.png

form/form_customization.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fields, so you no longer have to deal with form themes:
117117
value="{{ field_value(form.username) }}"
118118
placeholder="{{ field_label(form.username) }}"
119119
class="form-control"
120-
/>
120+
>
121121

122122
<select name="{{ field_name(form.country) }}" class="form-control">
123123
<option value="">{{ field_label(form.country) }}</option>

form/form_themes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ upon the form themes enabled in your app):
221221

222222
.. code-block:: html
223223

224-
<input type="number" id="form_age" name="form[age]" required="required" value="33"/>
224+
<input type="number" id="form_age" name="form[age]" required="required" value="33">
225225

226226
Symfony uses a Twig block called ``integer_widget`` to render that field. This
227227
is because the field type is ``integer`` and you're rendering its ``widget`` (as

reference/constraints/File.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ You can find a list of existing mime types on the `IANA website`_.
245245

246246
When using this constraint on a :doc:`FileType field </reference/forms/types/file>`,
247247
the value of the ``mimeTypes`` option is also used in the ``accept``
248-
attribute of the related ``<input type="file"/>`` HTML element.
248+
attribute of the related ``<input type="file">`` HTML element.
249249

250250
This behavior is applied only when using :ref:`form type guessing <form-type-guessing>`
251251
(i.e. the form type is not defined explicitly in the ``->add()`` method of

reference/forms/types/email.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ EmailType Field
22
===============
33

44
The ``EmailType`` field is a text field that is rendered using the HTML5
5-
``<input type="email"/>`` tag.
5+
``<input type="email">`` tag.
66

77
+---------------------------+---------------------------------------------------------------------+
88
| Rendered as | ``input`` ``email`` field (a text box) |

reference/forms/types/range.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ RangeType Field
22
===============
33

44
The ``RangeType`` field is a slider that is rendered using the HTML5
5-
``<input type="range"/>`` tag.
5+
``<input type="range">`` tag.
66

77
+---------------------------+---------------------------------------------------------------------+
88
| Rendered as | ``input`` ``range`` field (slider in HTML5 supported browser) |

reference/forms/types/search.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SearchType Field
22
================
33

4-
This renders an ``<input type="search"/>`` field, which is a text box with
4+
This renders an ``<input type="search">`` field, which is a text box with
55
special functionality supported by some browsers.
66

77
Read about the input search field at `DiveIntoHTML5.info`_

security.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -794,13 +794,13 @@ Finally, create or update the template:
794794

795795
<form action="{{ path('app_login') }}" method="post">
796796
<label for="username">Email:</label>
797-
<input type="text" id="username" name="_username" value="{{ last_username }}"/>
797+
<input type="text" id="username" name="_username" value="{{ last_username }}">
798798

799799
<label for="password">Password:</label>
800-
<input type="password" id="password" name="_password"/>
800+
<input type="password" id="password" name="_password">
801801

802802
{# If you want to control the URL the user is redirected to on success
803-
<input type="hidden" name="_target_path" value="/account"/> #}
803+
<input type="hidden" name="_target_path" value="/account"> #}
804804

805805
<button type="submit">login</button>
806806
</form>

security/csrf.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ generate a CSRF token in the template and store it as a hidden form field:
141141

142142
<form action="{{ url('admin_post_delete', { id: post.id }) }}" method="post">
143143
{# the argument of csrf_token() is an arbitrary string used to generate the token #}
144-
<input type="hidden" name="token" value="{{ csrf_token('delete-item') }}"/>
144+
<input type="hidden" name="token" value="{{ csrf_token('delete-item') }}">
145145

146146
<button type="submit">Delete item</button>
147147
</form>

security/form_login.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ Defining the redirect URL via POST using a hidden form field:
157157
<form action="{{ path('login') }}" method="post">
158158
{# ... #}
159159

160-
<input type="hidden" name="_target_path" value="{{ path('account') }}"/>
161-
<input type="submit" name="login"/>
160+
<input type="hidden" name="_target_path" value="{{ path('account') }}">
161+
<input type="submit" name="login">
162162
</form>
163163

164164
Using the Referring URL
@@ -301,8 +301,8 @@ This option can also be set via the ``_failure_path`` request parameter:
301301
<form action="{{ path('login') }}" method="post">
302302
{# ... #}
303303

304-
<input type="hidden" name="_failure_path" value="{{ path('forgot_password') }}"/>
305-
<input type="submit" name="login"/>
304+
<input type="hidden" name="_failure_path" value="{{ path('forgot_password') }}">
305+
<input type="submit" name="login">
306306
</form>
307307

308308
Customizing the Target and Failure Request Parameters
@@ -380,7 +380,7 @@ are now fully customized:
380380
<form action="{{ path('login') }}" method="post">
381381
{# ... #}
382382

383-
<input type="hidden" name="go_to" value="{{ path('dashboard') }}"/>
384-
<input type="hidden" name="back_to" value="{{ path('forgot_password') }}"/>
385-
<input type="submit" name="login"/>
383+
<input type="hidden" name="go_to" value="{{ path('dashboard') }}">
384+
<input type="hidden" name="back_to" value="{{ path('forgot_password') }}">
385+
<input type="submit" name="login">
386386
</form>

security/remember_me.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ checkbox must have a name of ``_remember_me``:
124124
{# ... your form fields #}
125125

126126
<label>
127-
<input type="checkbox" name="_remember_me" checked/>
127+
<input type="checkbox" name="_remember_me" checked>
128128
Keep me logged in
129129
</label>
130130

0 commit comments

Comments
 (0)