How To Set Layout?

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

Screen Shot

my code




<?php

$this->breadcrumbs=array(

    'Book',

);

?>


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

    'id'=>'test',

    'type'=>'horizontal',

    'enableClientValidation'=>true,

    'clientOptions'=>array(

        'validateOnSubmit'=>true,

    ),

));


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(

            'type'=>'POST',

            'url'=>CController::createUrl('Customers/MM'),

            'update'=>'#drpMinute',

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

        ),

        'class'=>'input-small'

    )

);


echo " : ";


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


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


echo CHtml::endForm();


$this->endWidget();


?>



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


$this->endWidget()

to


$form->endWidget()

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.