Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit adcbb5d

Browse filesBrowse files
committed
bug #3615 Fixes to cookbook/doctrine/registration_form.rst (Crushnaut)
This PR was merged into the 2.3 branch. Discussion ---------- Fixes to cookbook/doctrine/registration_form.rst As I was working through this example I noticed a few issues. Firstly, no button to submit the registration form is ever specified. Secondly, in the accountController the Response object is included, but not needed. Thirdly, the Request object is required in the code block for the method createAction in the accountController. | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all (or 2.3+) | Fixed tickets | none that I know of Commits ------- b56ab13 Made on additional fix as per previous pull request. adffc6b Fixes to cookbook/doctrine/registration_form.rst
2 parents 0928249 + b56ab13 commit adcbb5d
Copy full SHA for adcbb5d

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎cookbook/doctrine/registration_form.rst

Copy file name to clipboardExpand all lines: cookbook/doctrine/registration_form.rst
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ Next, create the form for this ``Registration`` model::
216216
'checkbox',
217217
array('property_path' => 'termsAccepted')
218218
);
219+
$builder->add('Register', 'submit');
219220
}
220221

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

241242
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
242-
use Symfony\Component\HttpFoundation\Response;
243243

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

273+
use Symfony\Component\HttpFoundation\Request;
274+
// ...
275+
273276
public function createAction(Request $request)
274277
{
275278
$em = $this->getDoctrine()->getManager();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.