Yii Framework Forum: Chtml::beginform - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chtml::beginform Rate Topic: -----

#1 User is offline   jasonban 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 11-May 12

Posted 12 February 2013 - 11:29 PM

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...
Sundar
0

#2 User is offline   Reza m 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 148
  • Joined: 07-March 12

Posted 13 February 2013 - 02:13 AM

you can give it a class trough htmlOptions like following

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

0

#3 User is offline   jasonban 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 11-May 12

Posted 16 February 2013 - 11:12 PM

View PostReza m, on 13 February 2013 - 02:13 AM, said:

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
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users