Dropdownlist In Form

Hi all,

In the form.php,

there is one row I wish to used it as dropdownlist which is Marital Status [single/married]

view is ok but there is no effect for my database.

Is there anything i miss out?




<div class="row">

   <?php echo $form->labelEx($model,'glob_maritus'); ?>

   <?php echo CHtml::dropDownList('glob_maritus', $select, array('single' => 'single', 'married' => 'married'));?>

   <?php echo $form->error($model,'glob_maritus'); ?>

</div>



Thanks for spending your precious time in my question. =)

Try this.


<div class="row">

   <?php echo $form->labelEx($model,'glob_maritus'); ?>

   <?php echo $form->dropdownlist($model,'glob_maritus', array("single" => "single", "married" => "married"));?>

   <?php echo $form->error($model,'glob_maritus'); ?>

</div>

Thanks.

Hi

Try to read my question i added it yesterday

http://www.yiiframework.com/forum/index.php/topic/40680-drowpdownlist-submit/

WoW! You make my day =D

Thanks alot Rvr101…

It’s working! =D