You are here

function nodeconnect_child_form_cancel in Node Connect 7

Ssets the redirect to a admin/nodeconnect/redirect page

1 string reference to 'nodeconnect_child_form_cancel'
nodeconnect_child_node_form_alter in ./nodeconnect.form.inc
Alters are child create form.

File

./nodeconnect.form.inc, line 138
handles all form alters and submit functions for nodeconnect

Code

function nodeconnect_child_form_cancel(&$form, &$form_state) {
  $cache_id = $form_state['clicked_button']['#parent_build_cache_id'];
  if ($cache_id && ($cache = cache_get($cache_id))) {
    $form_state['redirect'] = "admin/nodeconnect/return/{$cache_id}";
  }
}