Answer the question
In order to leave comments, you need to log in
How to rewrite Template / Theme forms?
Hello everyone, I can’t understand how and where to find blocks for customizing form rendering?
And how do I redraw the Theme of the form?
For example, a simple example, how to remake the label of the field here so that it is rendered as a placeholder?
At the moment I do it this way, but it is somehow stupid, and in many cases it is not at all suitable
{% form_theme content.snippet.form 'bootstrap_5_layout.html.twig' %}
{{ form_start(content.snippet.form) }}
{{ form_row(content.snippet.form.firstName, {'attr': {'placeholder': content.snippet.form.firstName.vars.label}, label:false }) }}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question