Please check the code below, the problem is that no form element are displayed in test action not able to locate
Test.php-->Form Class
class Application_Form_Test extends Zend_Form
{
public $T_FILEUP;
public $T_SUBMIT;
/*function init
* initialise all the elements
* */
public function _init()
{
$this->T_FILEUP=new Zend_Form_Element_Text('image');
//$this->T_FILEUP->setDestination(UPLOADS);
$this->T_SUBMIT=new Zend_Form_Element_Submit('add');
}
/*function to generate a form for specific function
* */
public function generateForm()
{
return $this->addElements(array($this->T_FILEUP,$this->T_SUBMIT));
}
}
TestAction
public function testAction()
{
$objForm=new Application_Form_Test();
$forms=$objForm->generateForm();
$this->view->form=$forms;
}
test.phtml
<?php
//echo $this->nm;
echo $this->form->image;
?>