How To Set Layout?

how to set nice layout? and how to set both dropdownlist in the same row?

Screen Shot

my code






<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(








echo CHtml::beginForm();

echo CHtml::errorSummary($model);

echo CHtml::Label('Q_number','');

echo $form->textFieldRow($model, 'C_name', array('id' => 'text'));

echo $form->dropDownListRow( $model, 'C_time',$this->HH(), array('empty' => 'เลือก',

        'ajax' => array(




            'data'=>array('hour' => 'js:this.value'),





echo " : ";

echo CHtml::dropDownList('drpMinute','', array('empty'=>'เลือก'), array('class'=>'input-small'));

echo CHtml::submitButton('Book', array('name' => 'submit'));

echo CHtml::endForm();



why are you nest another form (CHtml::beginForm( )) inside the bootstrap active form? this leads to misbehave and moreover you should close the active form like this only

$form->endWidget( )

coz some form name not match the database name.

if I change




I got error

TbActiveForm has an extra endWidget() call in its view.

I think in ur view there is more than one endWidget( ) calls available. so close it properly.