> So, for instance, 'my_decorator' is a bad class name as it (a) doesn't > follow Zend coding standards, and (b) tells nothing about what it does. > From what you say, it sounds like it's a submit button decorator -- so > let's call it 'My_Decorator_Submit'. Place it in > 'My/Decorator/Submit.php' somewhere in your include_path.
Of course my_decorator was just an example, perhaps a bad one, but I do name my files according to the Zend coding standard and I do name them descriptively. > Then, tell the form about the path: > $this->addElementPrefixPath('My_Decorator', 'My/Decorator/', > 'decorator'); > When you add the decorator, you can then add it like other decorators: > array( > 'decorator' => 'Submit', > 'options' => array('numColumns' => value, 'placement' => value), > ) I got this to work but now I face another problem. I want to put an id in the <td> tag that surrounds the labels. I've got it to work with the input elements but not with the labels. I've tried every option I could think about including making my own decorator and coming pretty close but without success. Have to say that these decorators are a bit complicated to use and could do with some more documentation. Perhaps a few standard decoration themes like for example a table is something to consider when adding to Zend_Form Thank you for your help so far. -- View this message in context: http://www.nabble.com/How-render-Zend_Form-to-html-table--tp15299082p16745131.html Sent from the Zend Framework mailing list archive at Nabble.com.