1 ajax_example_autocomplete.inc ajax_example_unique_autocomplete_submit($form, &$form_state)

Submit handler for node lookup unique autocomplete example.

Here the nid has already been placed in $form_state['values']['node'] by the validation handler.

Parameters

array $form: Form API form.

array $form_state: Form API form state.

File

modules/examples/ajax_example/ajax_example_autocomplete.inc, line 196
ajax_example_autocomplete.inc

Code

function ajax_example_unique_autocomplete_submit($form, &$form_state) {
  $node = node_load($form_state['values']['node']);
  backdrop_set_message(t('You found node %nid with title %title', array('%nid' => $node->nid, '%title' => $node->title)));
}