Skip to content

Commit 44ee091

Browse files
authored
[doc] adding ->createView() in normal symfony controller
Sorry if i did something wrong since it s my first PR there. If you don't add ->createView() in the render you ll get an error Cannot assign Symfony\Component\Form\Form to property xxxComponent::$formView of type ?Symfony\Component\Form\FormView
1 parent 52dc225 commit 44ee091

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ this, create your controller like normal, including the submit logic::
14821482

14831483
return $this->render('post/edit.html.twig', [
14841484
'post' => $post,
1485-
'form' => $form,
1485+
'form' => $form->createView(),
14861486
]);
14871487
}
14881488
}

0 commit comments

Comments
 (0)