Yii Framework Forum: Add Css To Label In Yii Booster - Yii Framework Forum

Jump to content

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

Add Css To Label In Yii Booster radioButtonListRow, yiibooster Rate Topic: -----

#1 User is offline   Mohammad Fareed 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 08-March 14
  • Location:Hyderabad

Posted 15 April 2014 - 11:28 PM

Hi,
Can any one suggest me how to add CSS for a Table.

As in the Example

<span id="Zone_status">
<label class="radio">
<input type="radio" name="Zone[status]" value="1" id="Zone_status_0" class="true">Enable</label>
<label class="radio">
<input type="radio" name="Zone[status]" value="0" id="Zone_status_1" class="true">Disable</label>
</span>

Here the class added to <input> tab , but i want to add to <label> tab ,can any one did this.?

i have used Yii Booster

<?php
echo $form->radioButtonListRow($model, 'status',
array('1'=>'Enable','0'=>'Disable'),
array('class' => 'true')
);
?>
-
With best Regards.
Mohammad Fareed.
0

#2 User is offline   jkofsky 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 536
  • Joined: 17-May 10
  • Location:Pensacola, Florida

Posted 16 April 2014 - 01:58 AM

View PostMohammad Fareed, on 15 April 2014 - 11:28 PM, said:

Hi,
Can any one suggest me how to add CSS for a Table.

As in the Example

<span id="Zone_status">
<label class="radio">
<input type="radio" name="Zone[status]" value="1" id="Zone_status_0" class="true">Enable</label>
<label class="radio">
<input type="radio" name="Zone[status]" value="0" id="Zone_status_1" class="true">Disable</label>
</span>

Here the class added to <input> tab , but i want to add to <label> tab ,can any one did this.?

i have used Yii Booster

<?php
echo $form->radioButtonListRow($model, 'status',
array('1'=>'Enable','0'=>'Disable'),
array('class' => 'true')
);
?>

It looks like you can only do that externaly
<div class="true">
        <?php
           echo $form->radioButtonListRow($model, 'status', 
                   array('1'=>'Enable','0'=>'Disable'),
                   );
        ?>
</div>

Do, or do not. There is no 'try.' Jedi Master Yoda
0

#3 User is offline   Mohammad Fareed 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 08-March 14
  • Location:Hyderabad

Posted 16 April 2014 - 07:44 AM

View Postjkofsky, on 16 April 2014 - 01:58 AM, said:

It looks like you can only do that externaly
<div class="true">
        <?php
           echo $form->radioButtonListRow($model, 'status', 
                   array('1'=>'Enable','0'=>'Disable'),
                   );
        ?>
</div>




is there any chance of htmlOption in this
-
With best Regards.
Mohammad Fareed.
0

#4 User is offline   jkofsky 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 536
  • Joined: 17-May 10
  • Location:Pensacola, Florida

Posted 16 April 2014 - 12:50 PM

View PostMohammad Fareed, on 16 April 2014 - 07:44 AM, said:

is there any chance of htmlOption in this

Not according to the docs. Maybe in Yii2.
Do, or do not. There is no 'try.' Jedi Master Yoda
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