Re: autocomplete issue in cake 1.3

2013-02-25 Thread Chris
sorry guys,... I misstyped form,... this is the right one: 

Form->create('User', array('url' => '/users/search')); ?>


Ajax->autoComplete('User.name', '/users/autoComplete', 
array('label' => false)); ?>



Form->end(__('Search', true)); ?>


On Friday, February 22, 2013 4:30:42 PM UTC-8, Chris wrote:
>
> hi guys,... can someone help please,... I have a autocomplete issue in 
> cake 1.3 
> I'm using jquery helper from http://www.cakephp.4uk.pl/ajax/autoComplete 
> I manage to see the results in form field, 
>
> this is my search.ctp file: 
>
> 
>
> Form->create('User', array('action' => 'search')); ?>
> Form->text('firstname', array('style' => 'width: 60px')) 
> ?> 
>
> Form->text('User.email', array('style' => 'width: 
> 60px')) ?> 
>
> Form->text('User.city', array('style' => 'width: 60px')) 
> ?> 
> Form->end(__('Search', true)); ?>
> 
>
> 
>   
>   link($profileShow->buddy($user_obj), '/profile/' . 
> $user_obj['User']['username'], array('escape'=>false)) ?>
>   <.div>
> 
>
> this is auto_complete.ctp 
>
> 
>  $member['User']['lastname'] . "\n" ?>
> 
>
>
>
> this is my controller functions: 
>
> function autoComplete() {
>
> $this->set('members', $this->User->find('all', array(
> 'conditions' => array(
> 'OR' => array( 
> 'User.firstname LIKE' => 
> $this->params['url']['q'].'%', 
> 'User.lastname LIKE' => $this->params['url']['q'].'%'
> )),
> 'fields' => array('firstname', 'lastname')
> )));
> $this->layout = 'ajax';
> }
>
>   function search() 
>   {
> $this->User->recursive = 0;
> $this->set('users', $this->paginate());
>
>   }
>
> I can see ALL users with pagination in that page, but not the user that I 
> search... 
> Please help,... 
>
> Thanks in advance 
> chris 
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




autocomplete issue in cake 1.3

2013-02-22 Thread Chris
hi guys,... can someone help please,... I have a autocomplete issue in cake 
1.3 
I'm using jquery helper from http://www.cakephp.4uk.pl/ajax/autoComplete 
I manage to see the results in form field, 

this is my search.ctp file: 



Form->create('User', array('action' => 'search')); ?>
Form->text('firstname', array('style' => 'width: 60px')) 
?> 

Form->text('User.email', array('style' => 'width: 60px')) 
?> 

Form->text('User.city', array('style' => 'width: 60px')) 
?> 
Form->end(__('Search', true)); ?>



  
  link($profileShow->buddy($user_obj), '/profile/' . 
$user_obj['User']['username'], array('escape'=>false)) ?>
  <.div>


this is auto_complete.ctp 







this is my controller functions: 

function autoComplete() {

$this->set('members', $this->User->find('all', array(
'conditions' => array(
'OR' => array( 
'User.firstname LIKE' => $this->params['url']['q'].'%', 
'User.lastname LIKE' => $this->params['url']['q'].'%'
)),
'fields' => array('firstname', 'lastname')
)));
$this->layout = 'ajax';
}

  function search() 
  {
$this->User->recursive = 0;
$this->set('users', $this->paginate());

  }

I can see ALL users with pagination in that page, but not the user that I 
search... 
Please help,... 

Thanks in advance 
chris 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.