Autocomplete problem with actionUpdate

hello all yii friends!Plz help me with autocomplete. my problem is with field that use autocomplete if we select list of customer. In hidden field will get id that we select to put in value. so if we don’t select list(mean put it blank) I need the value of hidden field get null too in update form.

this my code




<?php

$this->widget('zii.widgets.jui.CJuiAutoComplete', array(

    'name' => 'shipper_id',

	'sourceUrl' => array('Shipper/shipperautocom'),

	'value' =>$model->shipper_id,						    

	'options' => array(

		'showAnim' => 'fold',

		'select' => 'js:function(event, ui){ jQuery("#Booking_shipper_id").val(ui.item["id"]);

					$("#shipper_info").html("<b>Address1:</b> "+ui.item.address1);

					}'

							 

						   

	),

         

));


echo $form->hiddenField($model,'shipper_id');

?>        




hope all of you will reply me soon!! thanks :)

Hi

If you have a used activeform than you can used below

echo $form->hiddenField($model,‘shipper_id’);

otherwise replace with

echo $form->hiddenField("HiddenName",Value variable);

If you have get shipper_id from url than

echo $form->hiddenField(‘shipper_id’, $_GET[‘shipper_id’]);

Thanks

thank! but can u explan me again? I still don’t understand! ???