8000 allow html5 compatible rendering of forms with null names · symfony/symfony@01c9e3c · GitHub
[go: up one dir, main page]

Skip to content

Commit 01c9e3c

Browse files
ninzefabpot
authored andcommitted
allow html5 compatible rendering of forms with null names
1 parent 0877bf6 commit 01c9e3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
{%- else -%}
276276
{% set form_method = "POST" %}
277277
{%- endif -%}
278-
<form name="{{ name }}" method="{{ form_method|lower }}" action="{{ action }}"{% for attrname, attrvalue in attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}{% if multipart %} enctype="multipart/form-data"{% endif %}>
278+
<form{% if name != '' %} name="{{ name }}"{% endif %} method="{{ form_method|lower }}" action="{{ action }}"{% for attrname, attrvalue in attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}{% if multipart %} enctype="multipart/form-data"{% endif %}>
279279
{%- if form_method != method -%}
280280
<input type="hidden" name="_method" value="{{ method }}" />
281281
{%- endif -%}

0 commit comments

Comments
 (0)
0