Skip to content

Commit 925d4d7

Browse files
ninzefabpot
authored andcommitted
allow html5 compatible rendering of forms with null names
1 parent 4170f61 commit 925d4d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)