Nevermind. I think I worked it out. I was trying too hard, but a custom decorator for the Captcha_Word was still necessary.
If you're like me, re-read Matthew's answer a couple times and maybe it'll sink in. :blush: Matthew Weier O'Phinney-3 wrote: > > -- Matthew Lurz <[email protected]> wrote > (on Sunday, 31 August 2008, 04:42 AM -0700): >> >> I'm having some difficulty understanding how to implement a custom >> decorator >> for a Captcha element. The manual states: >> >> "The decorator used is determined by querying the captcha adapter. By >> default, the Captcha decorator is used, but an adapter may specify a >> different one via its getDecorator() method." >> >> Since all forms and elements in the application I'm working with require >> custom markup I call loadDefaultDecorators in the custom form and element >> classes. Unfortunately this doesn't seem to work with the Captcha >> element. I >> can understand why this wouldn't work to some extent but don't understand >> how to correctly implement a custom decorator. In a nutshell, I simply >> need >> to remove the DtDd wrapper with and HtmlTag. > > The default decorators for Captcha elements are: > > * Errors > * HtmlTag (dd) > * Label (with dt tag) > > When render() occurs, it shifts on the captcha decorator to the top of > the stack. So, simply call setDecorators as usual, but without a > ViewHelper decorator, and you'll be all set. > > -- > Matthew Weier O'Phinney > Software Architect | [email protected] > Zend Framework | http://framework.zend.com/ > > -- View this message in context: http://www.nabble.com/Zend_Form_Element_Captcha-%2B-Custom-Decorator-tp19241501p24472655.html Sent from the Zend Framework mailing list archive at Nabble.com.
