Change Label Property – YII Framework

In Yii form field have a mandatory  (*) symbol. While reusing the same label in view page, if the programmer wants to remove the mandatory symbol,then follow the below steps:

1. Change the below code

<?php echo $form->labelEx($model,’attribute’); ?> to <?php echo $form->label($model,’attribute’); ?>


Simple changes you have to change the text labelEx to label.

Yii Frame Work Development Company

To know more about our web and mobile development service visit
For more information, please contact us with the specifications for your project. You can email our sales team at, also you can call us at following numbers.
India: (+91) 44 42170775, (+91) 91766 40375
USA [Toll Free]: 866 220 6565

Leave a Reply

Your email address will not be published.