Skip to content

Commit

Permalink
bug #26584 [TwigBridge] allow html5 compatible rendering of forms wit…
Browse files Browse the repository at this point in the history
…h 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
  • Loading branch information
fabpot committed Mar 20, 2018
2 parents 0877bf6 + 01c9e3c commit a1be12e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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 -%}
Expand Down

0 comments on commit a1be12e

Please sign in to comment.