feature #26330 [FORM] Fix HTML errors. (Nyholm)
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FORM] Fix HTML errors.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
As mentioned in #26328.
Range and color do not support "required" attribute
Commits
-------
f75d8c1985
Fix HTML errors.
This commit is contained in:
commit
1928fafb9f
@ -10,6 +10,10 @@
|
||||
|
||||
{%- block form_widget_simple -%}
|
||||
{%- set type = type|default('text') -%}
|
||||
{%- if type == 'range' or type == 'color' -%}
|
||||
{# Attribute "required" is not supported #}
|
||||
{%- set required = false -%}
|
||||
{%- endif -%}
|
||||
<input type="{{ type }}" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
|
||||
{%- endblock form_widget_simple -%}
|
||||
|
||||
|
Reference in New Issue
Block a user