2009年7月10日星期五

Re: [fw-mvc] Zend_Form_Element_Submit class attribute

Unfortunately it doesn't work too. It adds attributes="standard" to
the element if it Zend_Form_Element_Button and doesn't add anything
still if it's Zend_Form_Element_Submit.

On Fri, Jul 10, 2009 at 1:40 AM, Graham
Anderson<graham.anderson@gmail.com> wrote:
> On Friday 10 July 2009 00:01:39 Kostyantyn Shakhov wrote:
>>        $this->addElement(
>>            'Submit',
>>            'btn_search',
>>            array(
>>                'label' => 'Search',
>>                'decorators' => $this->buttonDecorators,
>>                'class' => 'class_name'
>>            )
>>        );
>
> Try...
>        $this->addElement(
>            'Submit',
>            'btn_search',
>            array(
>                'label' => 'Search',
>                'decorators' => $this->buttonDecorators,
>                'attributes' => array(
>                        'class' => 'class_name'
>                )
>            )
>        );
>

没有评论: