hello all, i have problem when make autocomplete with CAutoComplete, i have googling but i haven’t got great answer. I want to make autocomplete from othe table. I want to make auto complete in form scor with value from user->nama. Please help me
hello all, i have problem when make autocomplete with CAutoComplete, i have googling but i haven’t got great answer. I want to make autocomplete from othe table. I want to make auto complete in form scor with value from user->nama. Please help me
Hello, im new on Yii, im trying to use
$form->widget('zii.widgets.jui.CJuiAutoComplete', array(
'name' => 'test1',
//'model' => $model,
//'attribute' => 'id_estado',
'source' => array('1111111', '1122222', '1133333'),
//'source' => $this->createUrl('city/autocompleteTest'),
// additional javascript options for the autocomplete plugin
'options' => array(
'minLength' => '2',
),
'htmlOptions' => array(
'style' => 'height:20px;'
)));
?>
If i put "name" like that, its work, but if i change name for, Model and Attribute fields didnt work…
with ‘source’ => $this->createUrl(‘city/autocompleteTest’) didnt work too, didnt call the function(tested on debug)
By the way… my form is ajaxValidation true…
$form = $this->beginWidget('CActiveForm', array(
'id' => 'city-form',
'enableAjaxValidation' => true,
));
Anyone have any idea why didnt work?
Thanks i think yout post solved my problem, You make my day