I would like to include the substring text in the Zend_Form_Element shortcut and it doesn't seem to work:
$zend_form_element->setLabel('Label <sub>x</sub>');
Is there anything I can do to display it correctly without having to manually write the form on the watch page? Thanks for the help,
Dave
Here is the correct way:
$zend_form_element->addDecorator('Label', rray('escape'=>false));
from: http://forums.zend.com/viewtopic.php?f=69&t=5706
I would say that the best way is to get the actual decorator from the element and then set the escape option rather than adding a new decorator:
$zend_form_element->getDecorator('Label')->setOption('escape',false);
Try:
$zend_form_element->setAttribs( array( 'escape' => false ) ) ->setLabel( 'Label <sub>x</sub>' );
Or the only thing:
$zend_form_element->setAttrib( 'escape', false ) ->setLabel( 'Label <sub>x</sub>' );
You can also do this as follows:
$radioElement = new Zend_Form_Element_Checkbox('formelement_0'); $radioElement->setLabel('Do you accept the <a href="#">Terms & Conditions</a>?'); $radioElement->getDecorator('Label')->setOption('escape', false);
From @fireeyedboy's answer, you can also do the following directly in your Zend_Form:
$this->addElement( 'radio', 'name', array( /* more settings */ 'attribs' => array( 'escape' => FALSE ) ));
Source: https://habr.com/ru/post/1304514/More articles:How to get Eclipse + PyDev + App Engine + Unit working? - pythonHow to determine the orientation of Windows Phone 7? - windows-phone-7C # that will allow me to reset - multithreadingC ++ Macro Arithmetic - c ++Java library: command line option - javaloading a class not in the classpath dynamically in a web application - without using a custom class loader - javaASP.NET Unique Identifier Constraint - asp.netHow to match oracle timestamp for corresponding java type in sleep mode? - javahttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1304519/a-good-way-in-net-winforms-to-have-user-entered-time-frame&usg=ALkJrhieBVc9sQonZcm00ErsKXu1nHbAUgHow to update datagridview column from text content of text field in C # Windows form - c #All Articles