Commit fa45d9a1 authored by Fabien Potencier's avatar Fabien Potencier

fixed the form example to not use deprecated methods

parent 03a326b3
......@@ -110,8 +110,7 @@ example::
))
->getForm();
if ('POST' == $request->getMethod()) {
$form->bind($request);
$form->handleRequest($request);
if ($form->isValid()) {
$data = $form->getData();
......@@ -121,7 +120,6 @@ example::
// redirect somewhere
return $app->redirect('...');
}
}
// display the form
return $app['twig']->render('index.twig', array('form' => $form->createView()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment