diff --git a/guides/forms.rst b/guides/forms.rst index b9e3a40fed6..9468a9e755a 100644 --- a/guides/forms.rst +++ b/guides/forms.rst @@ -79,7 +79,7 @@ the data is stored in a POST parameter with the name of the form:: // form setup... if ('POST' === $this['request']->getMethod()) { - $form->bind($this['request']->request->get('customer')); + $form->bind($this['request']->get('customer')); if ($form->isValid()) { // save $customer object and redirect @@ -253,7 +253,7 @@ Let's create a simple ``Registration`` class for this purpose:: /** @Validation({ @AssertTrue(message="Please accept the terms and conditions") }) */ public $termsAccepted = false; - public process() + public function process() { // save user, send emails etc. } @@ -277,7 +277,7 @@ Now we can easily adapt the form in the controller:: $form->add($group); if ('POST' === $this['request']->getMethod()) { - $form->bind($this['request']->request->get('customer')); + $form->bind($this['request']->get('registration')); if ($form->isValid()) { $registration->process();
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: