First I created a project using Zend_Tool. Then created a controller AuthenticationController in default module.
Created Form in projectfolder/application/forms/Login.php
class Forms_Login extends Zend_Form {
public function _construct() {
// add elements
}
}
Accessing Form in myproject/application/controllers/AuthenticationController.php
public function loginAction() {
$this->view->form = new Form_Login();
}
I am getting following error:
Fatal error: Class 'Application_Forms_Login' not found in /var/www/student/application/controllers/AuthenticationController.php on line 19
How can I access it with same form class name without including this file in AuthenticationController??
May be I have to tell zend in Bootstrap.php about this but I wan unable to find a sample code.
Thanks
you should declare them in your
bootstrap.phpfile like so: