Yii Framework Forum: Reset Default Value To Drop Down - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Reset Default Value To Drop Down

#1 User is offline   PMP 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 17-May 14

Posted 17 May 2014 - 03:11 AM

Hello,
I am newbie to Yii.
developing an application, and its interesting !
But having so many issues and questions.
like,
I have one query as:
I have give one drop down list with code:
        <b>Skill Type :</b>
        <?php
        $other_option =array('Other' => 'Other value');           
        $selectedOptions= CHtml::listData(SkillType::model()->findAll(array('order' => 'skill_type_id')),'skill_type_id','skill_type');
        $selectedOptions = array_merge( $selectedOptions, array( "Other" => "Other" )) ;   
        echo $form->dropDownList(SkillType::model(),'skill_type',$selectedOptions,
        $htmlOptions=array('id'=>'skill_type_name','prompt'=>'Select','onchange'=>'load_div()')
        ); ?>


but after filling some information i want to reset its value to again 'Select' i.e which is prompt value.
but how to do this in Yii?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users