hello all
i wanted to use a dropdownlist that has autocomplete functionalities.
so i googled and found a very nice yii extension EJuiComboBox from here.
http://www.yiiframework.com/extension/combobox
i downloaded it and copied combobox folder into the protected/extensions directory.
and in my view file i used the following code
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'version-form',
'enableAjaxValidation'=>false,
)); ?>
<p class="note">Fields with <span class="required">*</span> are required.</p>
<?php echo $form->errorSummary($model); ?>
<div class="row">
<?php echo $form->labelEx($model,'VersionName'); ?>
<?php echo $form->textField($model,'VersionName',array('size'=>50,'maxlength'=>50)); ?>
<?php echo $form->error($model,'VersionName'); ?>
</div>
<?php
$this->widget('ext.combobox.EJuiComboBox', array(
'model' => $model,
'attribute' => 'ModelID',
// data to populate the select. Must be an array.
'data' => $model->getAllModels(),
// options passed to plugin
// Options passed to the text input
'options' => array(
// JS code to execute on 'select' event, the selected item is
// available through the 'item' variable.
'onSelect' => 'alert("selected value : " + item.value);',
// JS code to be executed on 'change' event, the input is available
// through the '$(this)' variable.
'onChange' => 'alert("changed value : " + $(this).val());',
// If false, field value must be present in the select.
// Defaults to true.
'allowText' => false,
),
// Options passed to the text input
'htmlOptions' => array('size' => 10),
)); ?>
<div class="row buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
</div>
<?php $this->endWidget(); ?>
</div><!-- form -->
but when i view the page in the browser.i just shows the textbox.i used firebug to debug the page.i took
the screen shot.here it is
3208
please tell me what im missing here.i want dropdownlist to be same as demo.here is the link to that.
http://jqueryui.com/demos/autocomplete/combobox.html
please guys its argent.