addElementPrefixPath('App', 'App/'); parent::__construct($options); $this->setName('upload'); $this->setAttrib('enctype', 'multipart/form-data'); $name = new Zend_Form_Element_Text('name'); $name->setLabel('Name') ->setRequired(true) ->addValidator('NotEmpty'); $file = new App_Form_Element_File('Datafile'); $file->setRequired(true) ->addValidator('NotEmpty'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Upload'); $this->addElements(array($file, $submit)); } }