Answer the question
In order to leave comments, you need to log in
Zen in Framework1: How to add to a form field a notation that the field is required?
How to add a symbol in zend framework, for example a standard red asterisk, that the field is required?
The form is created via new Zend_Form_Element_Text('title');, in the usual form, I would add to the label
But it's not clear with zend <span style="color:#f00;">*</span>
Answer the question
In order to leave comments, you need to log in
stackoverflow.com/questions/12163636/what-is-best-...
If I'm not mistaken, this is done through a decorator. More or less like this:
$element = Zend_Form_Element_Text('title');
// ...
$element->getDecorator('Label')->setRequiredSuffix('<span style="color:#f00;">*</span>');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question