ahah

Autocomplete Form

In Zeiten des Web 2.0 sind ajax Features immer populärer und damit wichtiger. Ein wichtiges Element dabei ist die Autovervollständigung von Formularfeldern.
Dafür bietet Drupal einen richtig schönen Automatismus: #autocomplete_path im Formelement

$form['extra'] = array(
'#type' => 'textfield',
'#title' => 'extra',
'#default_value' => $node->extra,
'#required' => false,
'#autocomplete_path' => 'todo/js'
);
?>

Somit wird der Pfad 'todo/js' aufgerufen

Subscribe to RSS - ahah