Commit fa45d9a1 authored by Fabien Potencier's avatar Fabien Potencier

fixed the form example to not use deprecated methods

parent 03a326b3
......@@ -110,17 +110,15 @@ example::
))
->getForm();
if ('POST' == $request->getMethod()) {
$form->bind($request);
$form->handleRequest($request);
if ($form->isValid()) {
$data = $form->getData();
if ($form->isValid()) {
$data = $form->getData();
// do something with the data
// do something with the data
// redirect somewhere
return $app->redirect('...');
}
// redirect somewhere
return $app->redirect('...');
}
// display the form
......
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