//echo $form->textField($model,'album_id'); $albums = Album::getAll(); echo $form->dropDownList($model, 'album_id', $albums, array('prompt' => '单曲')); ?> <?php echo $form->error($model, 'album_id'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'artist_id'); ?> <?php //echo $form->textField($model,'artist_id'); echo $form->dropDownList($model, 'artist_id', Artist::getAll()); ?> <?php echo $form->error($model, 'artist_id'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'order'); ?> <?php echo $form->textField($model, 'order'); ?> <?php echo $form->error($model, 'order');
?> <?php echo $form->textField($model, 'name', array('size' => 60, 'maxlength' => 255)); ?> <?php echo $form->error($model, 'name'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'artist_id'); ?> <?php echo $form->dropDownList($model, 'artist_id', Artist::getAll(), array('prompt' => '请选择')); //echo $form->dropDownList($model,'artist_id',Artist::getAll(),array('ajax'=>array('type'=>'GET','url'=>Yii::app()->createUrl('album/dynamicalbums'),'update'=>'#Music_album_id','data'=>'js:jQuery(this).clone().appendTo(this);jQuery(this).parents("form").serialize()'))); ?> <?php echo $form->error($model, 'artist_id'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'album_id'); ?> <?php $albums = Album::getAll(); echo $form->dropDownList($model, 'album_id', $albums, array('prompt' => '单曲')); //echo $form->dropDownList($model,'album_id',array('请选择'));