Change error CSS Class of text Filed.

Actaully we use this creating a text filed.

$form->textField(CModel $model, string $attribute, array $htmlOptions=array ( ));

 Form reference.

Generates a text field input for a model attribute. If the attribute has input error, the input field's CSS class will be appended with errorCss. The default css is 'error'.

How do we change it?

Add this into your views template for changing single view.

 

CHtml::$errorCss = 'warning';

 

 

 

posted on 2012-11-10 15:17  技术员  阅读(169)  评论(0)    收藏  举报

导航