#Set custom text for label
htmlOptions
of such CHtml::activeLabel
and CActiveForm::label
methods have label
special option. It specifies the label to be displayed instead of CModel::getAttributeLabel
value.
<div class="form-group">
<div class="col-sm-6">
<?= $form->label( $model, 'source_title', [ 'label' => Yii::t( 'myApp', 'Resource title' ) ] ); ?>
<?= $form->textField( $model, 'source_title', [ 'class' => 'form-control', ] ); ?>
<?= $form->error( $model, 'source_title', [ 'class' => 'text-danger' ] ); ?>
</div>
</div>