We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ff05e0 commit 6fbd9a7Copy full SHA for 6fbd9a7
src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig
@@ -249,7 +249,14 @@
249
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ parent_label_class)|trim}) %}
250
{% endif %}
251
{% if label is empty %}
252
- {% set label = name|humanize %}
+ {%- if label_format is not empty -%}
253
+ {% set label = label_format|replace({
254
+ '%name%': name,
255
+ '%id%': id,
256
+ }) %}
257
+ {%- else -%}
258
+ {% set label = name|humanize %}
259
+ {%- endif -%}
260
261
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
262
{{ widget|raw }}
0 commit comments