I want to add a twig variable to my table row id in a form.
{% for child in form %}
{{ form_widget(child, {'id':'asterisks-rating-loop.index' }) }}
{% endfor %}
Currently it is not being parsed as a twig variable. Is there any way to set the id to 'asterisks-rating-'loop.index using this setup without the use of Javascript or jQuery?
I tried 'escaping' it with:
{{ form_widget(child, {'id':'asterisks-rating-{{loop.index}}' }) }}
{{ form_widget(child, {'id':'asterisks-rating-'{{loop.index}}'' }) }}
But obviously none of these solutions work.