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;		


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


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


&lt;?php echo &#036;form-&gt;error(&#036;model,'package_type_id'); ?&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;


//In packagecontroller

public function actionGetprice(){



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

Thanks for any help!


Please go through this links for example

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.