hi
i have 1 search form :
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'Search',
'enableClientValidation'=>true,
'clientOptions'=>array(
'validateOnSubmit'=>true,
),
)); ?>
<p class="note">Fields with <span class="required">*</span> are required.</p>
<div class="row">
<?php echo $form->labelEx($model,'name'); ?>
<?php $this->widget('CAutoComplete',
array(
//name of the html field that will be generated
'name'=>'name',
//replace controller/action with real ids
'url'=>array('search/AutoCompleteLookup'),
'max'=>10, //specifies the max number of items to display
//specifies the number of chars that must be entered
//before autocomplete initiates a lookup
'minChars'=>2,
'delay'=>500, //number of milliseconds before lookup occurs
'matchCase'=>false, //match case when performing a lookup?
//any additional html attributes that go inside of
//the input field can be defined here
'htmlOptions'=>array('size'=>'40'),
'methodChain'=>".result(function(event,item){\$(\"#user_id\").val(item[1]);})",
));
echo CHtml::activeHiddenField($model,'name'); ?>
<?php echo $form->error($model,'name'); ?>
</div>
<div>
<?php
echo $form->radioButtonList($model,'type',array('names'=>'name $ family','tel'=>'tel','job'=>'job'));
?>
</div>
<div class="row buttons">
<input type="submit" name="search" value="search" />
</div>
<?php $this->endWidget(); ?>
I want to this AutoComplete to be filled according to the press RadioButton!
What should I do???
thanks