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
-------
01c9e3ce70
allow html5 compatible rendering of forms with null names
This commit is contained in:
commit
a1be12e290
@ -275,7 +275,7 @@
|
||||
{%- else -%}
|
||||
{% set form_method = "POST" %}
|
||||
{%- endif -%}
|
||||
<form name="{{ name }}" method="{{ form_method|lower }}" action="{{ action }}"{% for attrname, attrvalue in attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}{% if multipart %} enctype="multipart/form-data"{% endif %}>
|
||||
<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 %}>
|
||||
{%- if form_method != method -%}
|
||||
<input type="hidden" name="_method" value="{{ method }}" />
|
||||
{%- endif -%}
|
||||
|
Reference in New Issue
Block a user