$form = $this->beginWidget('CActiveForm', array('id' => 'resource-form', 'enableAjaxValidation' => true, 'htmlOptions' => array('enctype' => 'multipart/form-data'))); ?> <?php echo $form->errorSummary($model); ?> <div> <div class="row" style="float:left"> <?php echo $form->labelEx($model, 'type'); ?> <?php echo $form->dropDownList($model, 'type', ConstantDefine::chooseFileTypes(), array('id' => 'chooseFileType')); ?> <?php echo $form->error($model, 'type'); ?> </div> <div class="row" style="float:left; margin-left:20px <?php if (!$is_new) { ?> ; display:none<?php } ?> "> <?php