Skip to content
Closed
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
6 changes: 3 additions & 3 deletions guides/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
}
Expand All @@ -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();
Expand Down