diff --git a/forms.rst b/forms.rst index 008c60a66c6..445ed2bae7c 100644 --- a/forms.rst +++ b/forms.rst @@ -290,7 +290,7 @@ Now that the form has been created, the next step is to render it:: $form = $this->createForm(TaskType::class, $task); return $this->render('task/new.html.twig', [ - 'form' => $form, + 'form' => $form->createView(), ]); } }