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">
<?php echo $form->labelEx($model,'package_type_id'); ?>
<?php
echo $form->DropDownList($model,'package_type_id',
CHtml::listData(PackageType::model()->findAll('status!="0"'),'id','name'),
array('prompt'=>'-- Package type --'));
?>
<?php echo $form->error($model,'package_type_id'); ?>
</div>
//Text to update
<div class="form-group">
<?php echo $form->labelEx($model,'unity_price'); ?>
<?php echo $form->textField($model,'unity_price'); ?>
<?php echo $form->error($model,'unity_price'); ?>
</div>
//In packagecontroller
public function actionGetprice(){
?????????
}
I hope all this are understandable because I am not fluent in English.
Thanks for any help!