Hello Yii friends…I am using

<?php echo CHtml::beginForm(array(‘setting/setname’), ‘post’, array(‘name’ => ‘savecommentary’)); ?>

to create form but now i want to give css class in the form. but I am getting confused as well as i tried some ways it didn’t work out.

Please help.

Thanks in Advance…


you can give it a class trough htmlOptions like following

echo CHtml::beginForm(array('setting/setname'), 'post', array('name' => 'savecommentary', 'class'=>'formCssClass'));

it worked thank you