Hi,
Can some one tell me how to place "*" sign before the label
Please refer the image if i am not clear.
This is the code that gives "*" after label "Password"
<div class="row">
<?php echo $form->labelEx($model,'password'); ?>
<?php echo $form->passwordField($model,'password'); ?>
<?php echo $form->error($model,'password'); ?>
</div>
Gregurco
(Gregurco Vlad)
2
Bizley
(Bizley)
3
You can optionally set $htmlOptions[‘required’] = true for activeLabel (activeLabelEx will overwrite it).
alirz23
(Ali Raza)
4
this is what you need
<?php
CHtml::$beforeRequiredLabel = ' <span class="required">*</span>';
CHtml::$afterRequiredLabel = '';
?>