Zend_Form not displaying data

snwboy

New Member
Here is my code:\[code\]<?phpclass IndexController extends Zend_Controller_Action{ public function indexAction() { $this->_forward('search'); } public function searchAction() { if($this->getRequest()->isGet()) { $form = $this->getForm(); $value = http://stackoverflow.com/questions/3907913/$form->getValue('search'); echo "'", $value, "'"; // <-- prints '' } $this->view->form = $this->getForm(); } public function getForm() { $form = new Zend_Form(); $form->setAction('/index/search') ->setMethod('get'); $search = $form->createElement('text', 'search'); $search->addFilter('StripTags') ->addFilter('StringTrim'); // Add elements to form: $form->addElement($search) ->addElement('submit', 'submit', array('label' => 'Search')); return $form; }}\[/code\]In searchAction() $value is always blank even after I submit the form and I see the data in the URL. What is the problem?EDIT: I fixed getValue() to getValues() but it still isn't working.
 
Top