Created
March 10, 2014 06:18
Revisions
-
umidjons revised this gist
Mar 10, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ `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. ```php <div class="form-group"> <div class="col-sm-6"> <?= $form->label( $model, 'source_title', [ 'label' => Yii::t( 'myApp', 'Resource title' ) ] ); ?> -
umidjons created this gist
Mar 10, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ #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. ```html <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> ```