Thread: Zend Form Issue
View Single Post
  #2 (permalink)  
Old 04-08-2008, 12:40 PM
NicP NicP is offline
Junior Member
 
Join Date: Apr 2008
Posts: 11
Default

One assumes you have activated Auto loader otherwise you would need to include the source files.

I always use this form

PHP Code:
        $form = new Zend_Form();
        
$form->setAction('edit')
             ->
setMethod('post')
             ->
setAttrib('class''dtTable');
        
$back $form->createElement('hidden''back');
        
        
// Create and configure username element:
        
$username $form->createElement('text''username');
        
$username->addValidator('stringLength'false, array(520))
                 ->
setRequired(true)
                 ->
addFilter('StringToLower')
                 ->
setLabel('Username')
                  ->
addDecorator(new Form_Decorator_Label)
                 ->
setOrder(1); 
long winded but easy to see whats going on. However, I am a novice.
Reply With Quote