title: how to select multiple entries from a auto complete box in cakephp?
body: <p>I have an auto complete box which is populated with the list of users of the application. It is working fine with the box listing the users.</p>
  
  <p>But  I am able to select only one user. How to select multiple users from the list ?
  And also how to save the selected user's names in a variable or an array?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I am using the built-in auto complete feature of the CakePHP framework. This is the action in the controller which generates the auto complete text box.</p>
  
  <pre><code>function autoComplete()
  {
    $this-&gt;set('users',$this-&gt;User-&gt;find('all',array(
                                    'fields'=&gt;array('User.id','User.name'),
      'conditions'=&gt;array('User.name LIKE' =&gt; $this-&gt;data['User']['name'].'%'))));
  
      $this-&gt;layout = "ajax";
  }
  </code></pre>
  
  <p>This is the auto_complete.ctp file </p>
  
  <pre><code>&lt;ul&gt;
      &lt;?php foreach($users as $user): ?&gt;
           &lt;li&gt;&lt;?php echo $user['User']['name']; ?&gt;&lt;/li&gt;
      &lt;?php endforeach; ?&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>And this is the view where I have the auto complete box: </p>
  
  <pre><code>&lt;?php echo $form-&gt;create('User', array('url' =&gt; '/forms/share')); ?&gt;
  
       &lt;?php  echo $ajax-&gt;autoComplete('User.name', '/forms/autoComplete');?&gt;
  
   &lt;?php echo $form-&gt;end('Share');?&gt;
  </code></pre>
  
  <p>In the auto complete box, I am able to select only one user name. how can I select multiple users with a comma or space separator?</p>