Yii Framework Forum: Adding Class Option For Element In Cform - Yii Framework Forum

Jump to content

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

Adding Class Option For Element In Cform Rate Topic: -----

#1 User is offline   Yuriy Poluda 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 29-January 09

Posted 04 December 2012 - 05:22 AM

Hello everybody!

When using CForm lack the ability to define an additional class for the <div> that contains form element

For example

$form = new CForm(array(
'elements'=>array(
'rate'=>array(
'type'=>'text',
'size'=>12,
'rowClass'=>'someRowClass',
),
),
'buttons'=>array(
'submitButton'=>array(
'type'=>'submit',
),
),

), $model);

This definition will generate element's row as follow:

<div class="row someRowClass">...</div>

and this will be usefull to style the row with css
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