Skip to content

Commit 45892b0

Browse files
committed
minor #8326 action_method.rst (atailouloute)
This PR was squashed before being merged into the 2.7 branch (closes #8326). Discussion ---------- action_method.rst On the form documentation [How to Change the Action and Method of a Form](https://symfony.com/doc/current/form/action_method.html), the examples "Standalone use" contain `$this->generateUrl`which does not make sense, since we are not inside a controller I though also about replacing by `...` since the important here is just to know how to change the action and not how to generate the route .. Commits ------- 656b865 action_method.rst
2 parents 7bb1e1a + 656b865 commit 45892b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

form/action_method.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ form, you can use ``setAction()`` and ``setMethod()``:
4949
$formFactory = $formFactoryBuilder->getFormFactory();
5050
5151
$form = $formFactory->createBuilder('form', $task)
52-
->setAction($this->generateUrl('target_route'))
52+
->setAction('...')
5353
->setMethod('GET')
5454
->add('task', 'text')
5555
->add('dueDate', 'date')
@@ -102,7 +102,7 @@ options:
102102
$formFactory = $formFactoryBuilder->getFormFactory();
103103
104104
$form = $formFactory->create(new TaskType(), $task, array(
105-
'action' => $this->generateUrl('target_route'),
105+
'action' => '...',
106106
'method' => 'GET',
107107
));
108108

0 commit comments

Comments
 (0)