2008年12月29日星期一

RE: [fw-mvc] Adding * to label

Hey, did you finally managed to find an answer to this problem ? It's an interesting question and I haven't found any answer to it.

--
My zend framework experience... the good, the bad
http://myzendframeworkexperience.blogspot.com/


> Hi,
>
> Currently I am using
>
> $element->getDecorator('label')->setOption('requiredSuffix', ' * ');
>
> to add * to required fields.
>
> I want to manage the markup from a centrally accessible place. Perhaps,
> a custom label decorator. If I wish to change the markup to
> <em>*</em> or to
> <div class="redAsterisk">*</div>
> it would be convenient to change it in one place.
>
> I just want to add this functionality to the label decorator and leave
> all else as is.
>
> What is the best method to accomplish this? I have seen some people
> adding * using CSS. I prefer to print the text character * and style it
> using CSS.
>
> It would be much more convenient if the custom decorator can check
> whether the element isRequired() and then add * to the label. But I
> can't figure out how to do it.
>
> Code examples would be highly appreciated.
>
> --
>
> With warm regards,
> Sudheer. S
> Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net
>
>


Organisez une fête en un tour de main : invitation, photos, blog…

没有评论: