Autocomplete Not Responding On Tabular Input

Hi, I am using the auto complete on a tabular input form. It is perfectly working on the main form, when i call the child form like this the auto complete is not working at all. What i am doing wrong. Any help or suggestion is really appreciated.

Yii::app()->clientScript->registerScript('vctranRow', "var lastTran = 0,a=1 ;

    var trTran = new String(" .

        CJSON::encode($this->renderPartial('form/_vctranRow', array('id' => 'idVcr', 'model' => new VcTran, 'form' => $form, 'this' => $this), true, false)) .


    function addTran(button)


        lastTran++; a++

        button.parents('table').children('tbody').append(trTran.replace(/idRep/g, lastTran));


    function deleteTran(button)










 <?php echo $form->textField($model, "[$id]vc_dr_type",array('size' => 2, 'maxlength' => 2)); ?>




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

















I think you need to reinitialize the autocomplete after cloning.

Thanks for the reply. Basically the child form is calling from the main form which is already initialized like this…

$form=$this->beginWidget('CActiveForm', array(




            foreach ($model->vctrans as $id => $vctran) {

                $this->renderPartial('form/_vctranRow', array('id' => $id, 'model' => $vctran, 'form' => $form, 'this' => $this), false, true);



 <?php $this->endWidget();   ?>

Then is there a need for re initilization.