Hello everyone! I create simple form in forms/user.php:
class Form_User extends Zend_Form
{
public function __construct() {
parent::__construct();
$this->setName('form_user');
$username = new Zend_Form_Element_Text('username');
$password = new Zend_Form_Element_Password('password');
$email = new Zend_Form_Element_Text('email');
$submit = new Zend_Form_Element_Submit('submit');
$this->addElements(array($username, $password, $email, $submit));
}
}
My controller code is:
public function registrationAction()
{
$this->view->title = 'Reg new acc!';
$this->view->headTitle($this->view->title, 'PREPEND');
$form = new Form_User();
$this->view->form = $form;
// $this->view->form = 'test';
}
and <?php echo $this->form; ?>
When I render my form nothing happen, only white screen.
When I render with this code in controller $this->view->form = 'test';
it show me "Test" text. What to do?