+2  A: 

You call loadDefaultDecorators in the constructor, and call setElementDecorators from there.

But addElement uses the element decorators only when you construct elements from strings, not when you pass a ready made element, while setElementDecorators only sets the decorators for the already existing controls (which are none in the constructor).

As you create the elements first and then pass them as Elements the element decorators are never set.

Remove the call to loadDefaultDecorators in the constructor.

Matijs
Ah thank you! I simply moved $this->loadDefaultDecorators(); just after $this->addElements.Thanks again
azz0r
A: 

I am now getting

Warning: Exception caught by form: No file decorator found... unable to render file element

I have tried setting a file decorator but its not working!

$this->addDecorator(array('File'), array('tag' => 'li'));

At the end of the My_Decorator_Design class.

If I make it part of:

    $this->setElementDecorators(array(
    'ViewHelper',
    'Label',
    'Errors',
'File',
    new Zend_Form_Decorator_HtmlTag(array('tag' => 'li')) //wrap elements in <li>'s
));

I get

Warning: Exception caught by form: Method getMaxFileSize does not exist Stack Trace: #0 [internal function]: Zend_Form_Element->__call('getMaxFileSize', Array) #1 /Users/aaron/Sites/project/name/library/Zend/Form/Decorator/File.php(108): Zend_Form_Element_Text->getMaxFileSize() #2 /Users/aaron/Sites/project/name/library/Zend/Form/Element.php(1978): Zend_Form_Decorator_File->render('titlepage

Ideas?

azz0r
File fields are currently a PITA to decorate. Take a look at my thread: http://stackoverflow.com/questions/2143462/how-do-i-use-viewscripts-on-zend-form-file-elements
Sonny
hm thats less than ideal. I guess Ill just have to stick to the default.
azz0r