Hello, everyone. Does anyone has an idea on how to implement the custom autocomplete like the demo on scriptaculous (http://demo.script.aculo.us/ajax/ autocompleter_customized)?
I have tried a little... I made this in my view: <div id="autocomplete" class="input required autocomplete"> <label for="AccountName">Conta Contabil</label> <?php echo($ajax->autoComplete('Account.name','/accounts/ autocomplete', array('id' => 'AccountName', 'indicator' => 'spinner'))); ?> <span id="spinner" class="disabled" style="display: none;"><?php echo($html->image('spinner.gif', array('class' => 'spinner'))); ?></ span> </div> And this in my controller: function autocomplete() { $this->layout = 'ajax'; $filter = null; if (isset($this->data) && !empty($this->data)) { $filter = 'Account.name LIKE "%' . $this->data['Account']['name'] . '%" OR Account.code LIKE "%' . $this->data['Account']['name'] . '%"'; } $this->set('data',$this->User->findAll($filter)); } But ajax doesnt seem to be retrieving it from the autocomplete function, because I have the following in the debug: SELECT `Account`.`id`, `Account`.`created`, `Account`.`modified`, `Account`.`company_id`, `Account`.`code`, `Account`.`name` FROM `accounts` AS `Account` WHERE `Account`.`name` LIKE '%a%' There is nowhere a reference to 'OR Account.code...' stuff in my view... What am I missing? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---