Disable escape in Zend Form Element Submit

Posted by Joaquín L. Robles on Stack Overflow See other posts from Stack Overflow or by Joaquín L. Robles
Published on 2012-11-28T15:29:16Z Indexed on 2012/11/28 17:05 UTC
Read the original article Hit count: 365

Filed under:
|

I can't disable escaping in a Zend_Form_Element_Submit, so when the label has special characters it won't display it's value..

This is my actual Zend Form piece of code:

$this->submit = new Zend_Form_Element_Submit('submit');
$this->submit->setLabel('Iniciar Sesión');
$this->submit->setIgnore(true);
$this->addElement($this->submit);

I've tried $this->submit->getDecorator('Label')->setOption('escape', false); but I obtain an "non-object" error (maybe submit isn't using the "Label" Decorator)..

I've also tried as suggested $this->submit->setAttrib('escape', false); but no text will be shown either.. Any idea? Thanks

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about zend-form