function ajax_example_unique_autocomplete_submit in Examples for Developers 7
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
- ajax_example/
ajax_example_autocomplete.inc, line 195 - ajax_example_autocomplete.inc
Code
function ajax_example_unique_autocomplete_submit($form, &$form_state) {
$node = node_load($form_state['values']['node']);
drupal_set_message(t('You found node %nid with title %title', array(
'%nid' => $node->nid,
'%title' => $node->title,
)));
}