bitmatix
(Bitmatix)
July 3, 2009, 10:30am
1
For some reason, all the required fields in the default contact form aren't marked with a '', but ig if try to submit the empty form, I'll get all required fields marked red. It's only the ' ' which is missing.
All my other forms work well. Any ideas?
qiang
(Qiang Xue)
July 3, 2009, 3:06pm
2
Are you using CHtml::activeLabelEx() ?
abajja
(Abajjam)
July 3, 2009, 4:18pm
4
Do you use any localized attribute?
abajja
(Abajjam)
July 6, 2009, 3:02pm
6
suppose you have
class ContactForm extends CFormModel
{
public $name;
...
and you write:
<?php echo CHtml::activeLabelEx($contact,'name '); ?> // note the space
or
<?php echo CHtml::activeLabelEx($contact,'nombre'); ?>
you will not see the asterisk. This what i wanted to explain.
bitmatix
(Bitmatix)
July 6, 2009, 3:07pm
7
yes, that's exactly how I do have it.
why are the '*' not shown?
abajja
(Abajjam)
July 6, 2009, 4:03pm
8
See http://www.yiiframew…eLabelEx-detail
…In particular, it calls CModel::isAttributeRequired …