Fill Text Field Based On Drop Down List Select

Hi! i have a problem, i am having 2 tables one is Package and another is

package type this package type contains type of package and price.

So in package i have one dropdwon list which contains all package type from package type table and text field of price.

what i want is when user select package type and price field fill automatic according to the package type,

(package type and price from the same table)

in my package _view

<div class="form-group">

&lt;?php echo &#036;form-&gt;labelEx(&#036;model,'package_type_id'); ?&gt;		


    &lt;?php 


     echo &#036;form-&gt;DropDownList(&#036;model,'package_type_id',


                    CHtml::listData(PackageType::model()-&gt;findAll('status&#33;=&quot;0&quot;'),'id','name'),


   array('prompt'=&gt;'-- Package type --'));


    ?&gt;       


&lt;?php echo &#036;form-&gt;error(&#036;model,'package_type_id'); ?&gt;


&lt;/div&gt;

//Text to update

    &lt;div class=&quot;form-group&quot;&gt;


	&lt;?php echo &#036;form-&gt;labelEx(&#036;model,'unity_price'); ?&gt;


	&lt;?php echo &#036;form-&gt;textField(&#036;model,'unity_price'); ?&gt;                          


	&lt;?php echo &#036;form-&gt;error(&#036;model,'unity_price'); ?&gt;


&lt;/div&gt;

//In packagecontroller

public function actionGetprice(){

??????????????????????????????

    } 

I hope all this are understandable because I am not fluent in English.

Thanks for any help!

Hi,

Please go through this links for example

http://www.yiiframework.com/wiki/24/

http://www.yiiframework.com/wiki/723/creating-a-dependent-dropdown-from-scratch-in-yii2/

thank you let me check

please can u give a sample depending on my problem ,i am new so please guide me step by step.