I want to have the user find a node, and then call up a function of mine with the node id when they submit. I tried with hooks, but I can't get it to work. Any ideas?

Comments

Driscoll’s picture

Okay, I figured that out. Now I need a add a variable to the form. So when I submit, I add that node to a list. Is that possible?

danielb’s picture

You would have to do something like this in a module

<?php


YOURMODULE_autocomplete_node_finder($op, $form, &$form_state, &$matched_nids) {
  if ($op == 'submit') {
    foreach ($matched_nids as $matched_nid) {
      your_function($matched_nid);
    }
  }
}


?>
danielb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.