Setting custom decorator configuration for one form element - Zend_Form

View: New views
2 Messages — Rating Filter:   Alert me  

Setting custom decorator configuration for one form element - Zend_Form

by Cristian Bichis-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

While i am rendering a form i am trying to make one of the (custom) form elements to render with just some of decorators, not for all.

I added some things like this on element constructor:

        $this->removeDecorator('Label');
        $this->removeDecorator('HtmlTag');
  
        $this->setDecorators(array('ViewHelper'));

But however, i didn't get any results, element is rendered using default decorators, as for all form elements.

Any idea how to do this ?

Cristian

Re: Setting custom decorator configuration for one form element - Zend_Form

by Matthew Weier O'Phinney-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-- Cristian Bichis <contact@...> wrote
(on Friday, 09 May 2008, 01:15 PM +0300):

> While i am rendering a form i am trying to make one of the (custom) form
> elements to render with just some of decorators, not for all.
>
> I added some things like this on element constructor:
>
>         $this->removeDecorator('Label');
>         $this->removeDecorator('HtmlTag');
>  
>         $this->setDecorators(array('ViewHelper'));
>
> But however, i didn't get any results, element is rendered using default
> decorators, as for all form elements.
>
> Any idea how to do this ?

I need to see more code to diagnose; not enough to go on here.

--
Matthew Weier O'Phinney
Software Architect       | matthew@...
Zend - The PHP Company   | http://www.zend.com/