Happy to help ;) Paddy
Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation ----- Original Message ---- From: DaveCool <[EMAIL PROTECTED]> To: [email protected] Sent: Thursday, June 5, 2008 8:32:43 PM Subject: Re: [fw-general] zend_form help! Thanks Paddy! It worked like a charm! I already had the same format as you in place for resetting the decorators. All I had to do was add 'escape'=>false to the label array I already had in place. this is what I used that worked $decorators = array( array('ViewHelper'), array('Errors'), array('Label', array( 'requiredSuffix' => ':', 'escape'=>false )) ); Pádraic Brady wrote: > > Hi Dave, > > The problem is that the Label decorator on the form uses a View Helper in > the background that, by default, is escaping it's content using > htmlspecialchars(). The solution is to replace that default decorator with > a custom one where you pass an extra parameter to the Label decorator > setting "escape" to be "false". > > For example, I define decorator options in arrays in a Zend_Form subclass > in the form: > > protected $_standardElementDecorator = array( > 'ViewHelper', > array('LabelError', array('escape'=>false)), > array('HtmlTag', array('tag'=>'li')) > ); > > LabelError is a Label Decorator subclass which automatically adds form > error messages to the Label (I use really short messages for this style). > But otherwise the principle is the same - the array setting the key > "escape" to "false" is an options array eventually passed to the > underlying FormLabel View Helper which prevents the escaping which in your > example causes the escaped output. > > Depending on your own method of describing a Zend_Form instance, similar > idea applies - you need to get that escape option integrated. > > Best regards, > Paddy > > -- View this message in context: http://www.nabble.com/zend_form-help%21-tp17670427p17677841.html Sent from the Zend Framework mailing list archive at Nabble.com.
