I\'m using Zend 1.8.4 and setting up a simple form test. My form class is located in \'./application/forms/SectorSearch.php\' and the class name is
Make sure the case matches exactly.
The folder has to be named Forms unless you specified different directory for Form
classes and make sure SectorSearch is not sEcTorSEarcH.php
or something
Zend Framework interprets underscores in Class names as folders. If you are manually adding the application/forms folder to the include path, then you should name your class FormSectorSearch (and the filename FormSectorSearch.php) instead of Form_SectorSearch. Otherwise you would only add the application folder to the include path and then named the folder Form instead of forms.
I added the following to my Bootstrap.php file
protected function _initAutoload()
{
$autoloader = new Zend_Loader_Autoloader_Resource(array(
'namespace' => '',
'basePath' => APPLICATION_PATH,
'resourceTypes' => array(
'form' => array(
'path' => 'forms',
'namespace' => 'Form',
),
'model' => array(
'path' => 'models',
'namespace' => 'Model',
),
)
));
return $autoloader;
}
and now it works, no errors anymore.. damn i'm glad it works, i was almost going mad.. :)