Symfony2 -> Twig -> Form -> Field -> Set rendered = true
问题 i have a simple problem. I have a form with a field for example: $builder ->add('x') ->add('y') ->add('z') ; In my twig files i used multiple blocks and i want to stop render fields... I view the b.html.twig file! a.html.twig {% block body %} {% block form %} {{ form_widget(form) }} {% endblock form %} {% endblock body %} b.html.twig {% block form %} {{ form.x.set('rendered', true) | default() }} {{ parent() }} {% endblock form %} If i remove the "default()" i get the error, that the object