Yii Framework Forum: How To Hide Attribute In Bootstrap.widgets.tbdetailview - Yii Framework Forum

Jump to content

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

How To Hide Attribute In Bootstrap.widgets.tbdetailview Rate Topic: -----

#1 User is offline   Javed Iqbal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 25-October 11

Posted 10 April 2014 - 01:25 PM

Hi all,

Can any one tell me that how to apply htmloption on bootstrap.widgets.TbDetailView attribute. I want to hide an attribute on runtime (by apply some condition). Following is my View.php code:
$this->widget('bootstrap.widgets.TbDetailView', array(
    'data' => $model,
    'type' => 'striped bordered condensed',
    'attributes' => array(
// I want to show bonus attribute if and only if its value is greater than 0
array('name'=>'bonus', 'value'=> $model->bonus, 'htmlOptions'=>array("style"=>"display:none;")),
),
));

Javed Iqbal

Web Developer
syntecX Solution
skype:javedboqo
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