ich ahbe ein Problem mit meinem autoComplete. Ziel: Bei Eingabe soll eine Liste von Vorschlägen gezeigt werden.
Ich habe es nach: http://book.cakephp.org/de/view/208/AJAX#!/de/view/632/autoComplete gebaut.
- Code: Alles auswählen
function autoComplete() {
//Partial strings will come from the autocomplete field as
//$this->data['Post']['subject']
$this->set('katalogs', $this->Katalog->find('all', array(
'conditions' => array(
'Katalog.Haupteintrag LIKE' => $this->data['Katalog']['Haupteintrag'].'%'
),
'fields' => array('Haupteintrag'),
'group' => 'Haupteintrag'
)));
$this->layout = 'ajax';
}
- Code: Alles auswählen
- <?php echo $ajax->autoComplete('Katalog.Haupteintrag', '/katalogs/autoComplete', array('label' => false));?>
könnt ihr mir helfen?
Lieben gruß