Set CActiveForm class

Hi

How can I set up the class for my form?

I have my customized CSS and I want to apply that to all my forms but I am unable to set up the class of the form.

Please help.

Thanks,

Vic

[b]<?php $form=$this->beginWidget(‘CActiveForm’, array(

'id'=&gt;'getscores-form',


'enableClientValidation'=&gt;true,


'clientOptions'=&gt;array(


	'validateOnSubmit'=&gt;true,


),

)); ?>[/b]

Hi,

you have put your custom css under css folder than call your css on your view/layout/anyfile(those you are calling) like this way.

<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->baseUrl; ?>/css/stylesheet.css" media="screen, projection" />

Thanks

Use CActiveForm.htmlOptions:




$form=$this->beginWidget('CActiveForm', array(

    'id'=>'getscores-form',

    'enableClientValidation'=>true,

    'clientOptions'=>array(

        'validateOnSubmit'=>true,

    ),

    'htmlOptions'=>array(

        'class'=>'my-form-class',

    ),

));



working fine