-- matej sircelj <[EMAIL PROTECTED]> wrote
(on Friday, 25 July 2008, 04:37 PM -0700):
> I have a problem. I made a small form which has some validators. If
> validation fails I want to make labels bold, but instead tags get displayed
> on the screen. I use firefox 3. You can see my form here:
> http://narocilo.s-media.si
I'm assuming you're passing something like: '<b>Foo:</b>' as a label? If
that's the case, by default the label is escaped via htmlentities. You
can turn this off by passing a boolean false as the 'escape' option to
the decorator when you create it.
> My Label decorator is:
>
> <?php
> class Narocilnica_Form_Decorator_LabelError extends
> Zend_Form_Decorator_Label{
> public function getLabel(){
> $element = $this->getElement();
> $errors = $element->getMessages();
> if (empty($errors)) {
> return parent::getLabel();
> }
>
>
> $label = ''.$element->getLabel().'';
>
> $element->setLabel($label);
>
> return parent::getLabel();
> }
> }
>
> Best regards
>
> Matej
>
>
>
> --
> View this message in context:
> http://www.nabble.com/html-tags-dont-get-rendered-after-validation-tp18661344p18661344.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
--
Matthew Weier O'Phinney
Software Architect | [EMAIL PROTECTED]
Zend Framework | http://framework.zend.com/