Skip to content

Fixes to cookbook/doctrine/registration_form.rst #3615

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
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
5 changes: 4 additions & 1 deletion cookbook/doctrine/registration_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ Next, create the form for this ``Registration`` model::
'checkbox',
array('property_path' => 'termsAccepted')
);
$builder->add('Register', 'submit');
}

public function getName()
Expand All @@ -239,7 +240,6 @@ controller for displaying the registration form::
namespace Acme\AccountBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;

use Acme\AccountBundle\Form\Type\RegistrationType;
use Acme\AccountBundle\Form\Model\Registration;
Expand Down Expand Up @@ -270,6 +270,9 @@ And its template:
Next, create the controller which handles the form submission. This performs
the validation and saves the data into the database::

use Symfony\Component\HttpFoundation\Request;
// ...

public function createAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
Expand Down