ZF-8722: Cannot set ´escape´ option for label(s) of ´multiOptions´ using Zend_Form_Element_Radio
Description
I try to insert HTML into labels for a Zend_Form_Element_Radio element. But I can't find the correct way to set the "escape" option. Is there any?
$element = new Zend_Form_Element_Radio('image');
$element->setMultiOptions(array(
'1' => '
',
'2' => '
'
));
$element->setDecorators(array(
array('ViewHelper', array(
'escape' => false
)),
array('Label', array(
'escape' => false
)),
array(array('div' => 'HtmlTag'), array('tag' => 'div'))
));
Comments
Posted by Webdevilopers (tridem) on 2010-06-22T05:24:52.000+0000
What is the current status for this issue? All the changes have become confusing, sorry!
I tried this to achieve set "esacpe" to false - is it a good solution?
Posted by Christian Albrecht (alab) on 2010-06-30T14:34:24.000+0000
Tridem, that needs to be done consistent across different Decorators|Views|Elements, the status is - on some Elements someone implemented escape = false on others it lacks this feature, your best bet is to read the Sources.
One thing i wonder though is whether to set escape = false for every escaped output at once or split it into multiple keys for each escaped value|attribute.