Render controller and get form errors from child
问题 I have a template where I render a widget which contains a form: {{ render(controller('ApplicationDemoBundle:Demo:newWidget', {'demo' : entity })) }} The newWidgetAction calls a createAction: public function createAction(Request $request) { $entity = new Demo(); $form = $this->createCreateForm($entity); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($entity); $em->flush(); return $this->redirect($this->generateUrl('demo_show',