Missing Label Of An Form-Element

That’s the function in the corresponding Model:




public function getChildOptions () {

    return CHtml::listData(ChildOptions::model()->findAll(),'id', 'description' );

}



And this is the view:




echo $form->dropDownList($model, 'childOptions_id', $model->getChildOptions());



It works wonderful, but where is my label and why is my label disappeared?

In the following case (not desired-one) the label was here:




echo $form->textFieldRow($model,'childOptions_id');



Maybe some additional information, I use Bootstrap-Extension.

Thank you…

$form->textFieldRow() is a bootstrap extension method, it generates label, field and error.

$form->dropDownList() is CActiveForm.dropDownList(). It renders only a dropdown list. You have to manually display label and error:




echo $form->label($model, 'childOptions_id');

echo $form->dropDownList(...);

echo $form->error(...);