Question

I am having problem with yii tokeninput extension. When i search name it gives the user list and if i select any name and if that name is also selected previous than the cursor point after the selected item, it does not point at the end of all the the item in the input box.

I am using this configuration.

$this->widget('ext.tokeninput.TokenInput', array(
       'model' => $model,
       'attribute' => 'USER_ID',
       'url'=>$this->createUrl('user/searchUserNames'),
       'options' => array(
           'allowCreation' => false,
           'preventDuplicates' => true,
          // 'resultsFormatter' => 'js:function(item){ return “<li><p>” + item.name + “</p></li>” }',
           'theme' => 'facebook',
            //'hintText' => 'Type',
            'prePopulate' => $prePopulate,
            'processPrePopulate' => $processPrePopulate,

       )
   ));

I have also lookout at the examples but does not find the solution. can any one help me ? Loopj: jquery token input demo

Was it helpful?

Solution

    plz comment the line number 509 in **jquery.tokeninput.js** 
    input_token.insertAfter(found_existing_token);
    that line insert cursor after that selected item so if you comment 
    this line cursor is at the end of all names
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top