Skip to content

[Cookbook][Form - direct submit] Fixed broken links to API #3284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cookbook/form/direct_submit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ submissions::

return $this->redirect($this->generateUrl('task_success'));
}

return $this->render('AcmeTaskBundle:Default:new.html.twig', array(
'form' => $form->createView(),
));
Expand All @@ -45,9 +45,9 @@ Calling Form::submit() manually

In some cases, you want better control over when exactly your form is submitted
and what data is passed to it. Instead of using the
:method:`Symfony\Component\Form\FormInterface::handleRequest`
:method:`Symfony\\Component\\Form\\FormInterface::handleRequest`
method, pass the submitted data directly to
:method:`Symfony\Component\Form\FormInterface::submit`::
:method:`Symfony\\Component\\Form\\FormInterface::submit`::

use Symfony\Component\HttpFoundation\Request;
// ...
Expand Down Expand Up @@ -76,8 +76,8 @@ method, pass the submitted data directly to
.. tip::

Forms consisting of nested fields expect an array in
:method:`Symfony\Component\Form\FormInterface::submit`. You can also submit
individual fields by calling :method:`Symfony\Component\Form\FormInterface::submit`
:method:`Symfony\\Component\\Form\\FormInterface::submit`. You can also submit
individual fields by calling :method:`Symfony\\Component\\Form\\FormInterface::submit`
directly on the field::

$form->get('firstName')->submit('Fabien');
Expand All @@ -90,7 +90,7 @@ Passing a Request to Form::submit() (deprecated)
.. versionadded:: 2.3
Before Symfony 2.3, the ``submit`` method was known as ``bind``.

Before Symfony 2.3, the :method:`Symfony\Component\Form\FormInterface::submit`
Before Symfony 2.3, the :method:`Symfony\\Component\\Form\\FormInterface::submit`
method accepted a :class:`Symfony\\Component\\HttpFoundation\\Request` object as
a convenient shortcut to the previous example::

Expand Down Expand Up @@ -118,7 +118,7 @@ a convenient shortcut to the previous example::
));
}

Passing the :class:`Symfony\\Component\HttpFoundation\\Request` directly to
Passing the :class:`Symfony\\Component\\HttpFoundation\\Request` directly to
:method:`Symfony\\Component\\Form\\FormInterface::submit` still works, but is
deprecated and will be removed in Symfony 3.0. You should use the method
:method:`Symfony\Component\Form\FormInterface::handleRequest` instead.
:method:`Symfony\\Component\\Form\\FormInterface::handleRequest` instead.