Skip to content

Forms: fixed typos #19

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

Closed
wants to merge 1 commit into from
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