Zend_Form Rendering (beyaz ekran)

0 Cevap php

Ben formlar / User.php basit bir form oluşturun:

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));
    }
}

Benim denetleyicisi kodu:

    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?

0 Cevap