Your Zend_Form is a POST method.
You can also do it this way in your controller.
$form = new Default_Form_FormName(); // instantiate the form
$this->view->form = $form; // form for the view
//after submitting the form
if($this->getRequest()->isPost()) { // if the form is a post
$formData = $this->getRequest()->getPost(); // get the data from the
post
if ($form->isValid($formData)) { //if the post if valid
$values = $form->getValues(); //values of the form
//make an array
$data=array(
'er1'=>$values['er1'],
'er2'=>$values['er2'],
);
}
}
On Sat, Oct 24, 2009 at 8:03 AM, Peter Warnock <[email protected]>wrote:
> 2009/10/22 Krzysztof Szatanik <[email protected]>
>
>> As you can see even if i get form values in request as i wanted, they
>> aren't recognized by Zend_Form. Output of $form->getValues() is different
>> from expected, and even fields aren't recognized, so i can use Zend_Form
>> only to generate HTML form but not to filter and validate submited form.
>>
>
> Assuming it's a post:
>
> $form->isValid($request->getPost());
> $data = $form->getValues();
>
> - pw
>
--
Shaun J. Farrell
Washington, DC
(202) 713-5241
www.farrelley.com