View Single Post
  #1 (permalink)  
Old 04-15-2008, 07:08 AM
Jhorra Jhorra is offline
Member
 
Join Date: Jun 2007
Posts: 33
Default Zend_Form issue that makes no senese

Here's my include path: set_include_path('.' . PATH_SEPARATOR . './library/' . PATH_SEPARATOR . './application/forms/' . PATH_SEPARATOR . './application/models/' . PATH_SEPARATOR . get_include_path());

I've verified that the Forms.php file in in the Zend folder locally and on the server.

Here is the error I get: Fatal error: Class 'Zend_Form_Element_Text' not found in /home/tplgame/public_html/application/forms/RegisterForm.php on line 11

This makes absolutely no sense to me. I'm including the file but for some reason it isn't seeing it or something. If anyone can help it would be greatly appreciated.

Here's my form:
PHP Code:

Zend_Loader
::loadClass('Zend_Form');

class 
RegisterForm extends Zend_Form
{
    public function 
__construct($options null)
    {
        
parent::__construct($options);
        
$this->setName('register');
        
        
$username = new Zend_Form_Element_Text('username');
        
$username->setLabel('Username')
            ->
setRequired(true)
            ->
setValidators('NotEmpty');
            
        
$username = new Zend_Form_Element_Text('email');
        
$username->setLabel('Email Address')
            ->
setRequired(true)
            ->
setValidators('NotEmpty');
            
        
$password = new Zend_Form_Element_Password('password');
        
$password->setLabel('Password')
            ->
setRequired(true)
            ->
setValidators('NotEmpty');
            
        
$confirm_password = new Zend_Form_Element_Password('confirm_password');
        
$confirm_password->setLabel('Confirm Password')
            ->
setRequired(true)
            ->
setValidators('NotEmpty');
            
        
$submit = new Zend_Form_Element_Submit('submit');
        
$submit->setLabel('Register');
        
        
$this->addElements(array($username$email$password$confirm_password$submit));
    }

Reply With Quote