-
Notifications
You must be signed in to change notification settings - Fork 5
forms retrieving
Harmen Janssen edited this page Aug 22, 2016
·
2 revisions
After the form is submitted, you can see if the input is valid and retrieve the values, like so:
if ($this->getRequest()->isPost()) {
if ($form->isValid($this->getRequest()->getPost())) {
$values = $form->getValues();
// … do something …
}
}
isValid()
should contain the post data.
Note that the isValid()
call automatically adds error messages to the form, if any. It will also write the submitted values back to the input fields.
You can also fetch individual elements.