Skip to content

Instantly share code, notes, and snippets.

@michael-romer
Created October 19, 2012 19:30
Show Gist options
  • Save michael-romer/3920196 to your computer and use it in GitHub Desktop.
Save michael-romer/3920196 to your computer and use it in GitHub Desktop.
Listing 16.9
public function indexAction()
{
$form = new \Helloworld\Form\SignUp();
if ($this->getRequest()->isPost()) {
$form->setData($this->getRequest()->getPost());
if ($form->isValid()) {
var_dump($form->getData());
} else {
return new ViewModel(
array(
'form' => $form
)
);
}
} else {
return new ViewModel(
array(
'form' => $form
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment