Fixed:
// Add button
 $submit = new Zend_Form_Element_Button(array(
'name' => 'quick-search-submit',
'label' => '<span class="ui-icon ui-icon-search">&nbsp;</span>Traži',
'escape' => false,
'class' => 'ui-corner-all ui-button ui-state-default'
 ));
 $submit->setDecorators(array('ViewHelper'));
 $this->addElement($submit);

This part of doc is comfusing:
"in other words, to set the text of the button, set the value of the
element."
should be removed from
http://framework.zend.com/manual/en/zend.form.standardElements.html

Regards,
Saša Stamenković


On Mon, Sep 28, 2009 at 9:31 AM, umpirsky <umpir...@gmail.com> wrote:

>
> Hi.
>
> First, the code:
>
> // Add button
>  $submit = new Zend_Form_Element_Button(array(
>        'name' => 'quick-search-submit',
>        'content' => '&nbsp;Traži',
>        'class' => 'ui-corner-all ui-button ui-state-default'
>  ));
>  $submit->setDecorators(array('ViewHelper'));
>  $this->addElement($submit);
>
> I tried with setValue as well, but all I get is :
>
> <button id="quicksearchsubmit" class="ui-corner-all ui-button
> ui-state-default" type="button"
> name="quicksearchsubmit">quicksearchsubmit</button>
>
> rendered!?
>
> How can I actually add html content to my button?
> --
> View this message in context:
> http://www.nabble.com/Adding-content-to-Zend_Form_Element_Button-tp25641485p25641485.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>

Reply via email to