I'm trying to create dynamically variable name so the result to be as the one below
{{ form_label(form.user_1) }}
{{ form_label(form.user_2) }}
{{ form_label(form.user_3) }}
{{ form_label(form.user_4) }}
Here's what I tried so far
{% for user in users %}
{{ form_label(form.user~'_'~loop.index) }}
{% endfor %}
but get
Argument 1 passed to Symfony\Component\Form\FormRenderer::searchAndRenderBlock() must be an instance of Symfony\Component\Form\FormView, string given
What I'm doing wrong?