On 06/10/11 01:03, monk.e.boy wrote: > David Muir-2 wrote: >> >> <table> >> <tr> >> <td><?=$firstname->renderLabel()?></td> >> <td><?=$firstname->renderViewHelper()?><br /> >> <?=$firstname->renderErrors()?></td> >> </tr> >> …etc… >> >> </table> >> >> Except I wouldn't be using tables, but fieldsets and divs instead. >> > This is the way every project I've worked on (in 3 different jobs) do ZF > Forms. All the devs I've talked to hate the decorators. All the designers > I've worked with hate the default tag layout ZF has and ask me to change > them. > > I think 99% of the confusion comes from the $options array of arrays of > arrays :( maybe if this was a proper object so the IDE could help with > auto-complete it'd make things easier. > > monk.e.boy > > -- > View this message in context: > http://zend-framework-community.634137.n4.nabble.com/Over-engineered-Zend-Form-Decorators-help-tp3850650p3874597.html > Sent from the Zend Framework mailing list archive at Nabble.com. >
Indeed, the options array is where things go wrong 90% of the time for me. You can hard-wire it all using objects, but I use the options array because otherwise you don't get the benefits of lazy-loading (unless I've missed something?). When rendering, I don't want all the validators, and when validating, I don't need all the decorators etc. Cheers, David -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
