Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a1be12e

Browse filesBrowse files
committed
bug #26584 [TwigBridge] allow html5 compatible rendering of forms with null names (systemist)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #26584). Discussion ---------- [TwigBridge] allow html5 compatible rendering of forms with null names Fixes html5 validation error with null form names. Commits ------- 01c9e3c allow html5 compatible rendering of forms with null names
2 parents 0877bf6 + 01c9e3c commit a1be12e
Copy full SHA for a1be12e

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.