Yii Framework Forum: Yii Bootstrap Tbgrupobutton - Yii Framework Forum

Jump to content

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

Yii Bootstrap Tbgrupobutton Rate Topic: -----

#1 User is offline   Sergio_HW 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 30-December 13

Posted 05 February 2014 - 04:07 AM

I need to fill a bootstrap.widgets.TbButtonGroup like a Dropdownlist, i have this:

$models = ZfInfraestructuras::model()->findAll(array('order' => 'infraestructura_nombre'));

        $list = CHtml::listData($models, 
                'infraestructura_id', 'infraestructura_nombre');

        echo CHtml::dropDownList('infraestructuras', $models, 
              $list,
              array('prompt' => 'Selecciona Infraestructura'));

And it works, but i need this:

<?php $this->widget('bootstrap.widgets.TbButtonGroup', array(
        'type'=>'', // '', 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'
        'buttons'=>array(
            array('label'=>'Selecciona Infraestructura', 
                  'items'=>array($list),

            )),
        ),
    )); ?>


I dont need to use the variable $list, i just need the same result.

Thanks!
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