I got stuck while trying to customize the rendering of a specific field in my form. It looks like this:
$builder->add('players', 'entity', array(
'class' => 'Acme\Bundle\Entity\Player',
'expanded' => true,
'multiple' => true,
'required' => false,
));
The form itself is beeing rendered with a simple:
{% block form_content %}
{% form_theme form 'AcmeBundle:Form:fields_child.html.twig' %}
{{ form_widget(form) }}
{% endblock %}
Now inside fields_child.html.twig i'm extending from another form template but there is nothing special there. My HTML looks like this:
Players: - [checkbox-input] 1
Where 1 equals the id of the only player in the database. However instead of rendering the ID im trying to render his picture and full name after the checkbox. I have tried many combinations of the form theming to override it but failed each time. Could someone post the twig block to render what i want here?
Thanks
AcmeBundle:Form:fields_child.html.twig? :)