You are here

function nodehierarchy_node_form_add_parent in Node Hierarchy 6.3

Same name and namespace in other branches
  1. 6.2 nodehierarchy.module \nodehierarchy_node_form_add_parent()
  2. 7.2 nodehierarchy.module \nodehierarchy_node_form_add_parent()

Submit the form after 'add parent' has been clicked. Don't save anything just rebuild the node and the new parent will show up as normal.

1 string reference to 'nodehierarchy_node_form_add_parent'
nodehierarchy_nodehierarchy_node_form in ./nodehierarchy.module
Get the node edit form for nodehierarchy.

File

./nodehierarchy.module, line 589
A module to make nodes hierarchical.

Code

function nodehierarchy_node_form_add_parent($form, &$form_state) {
  $node = node_form_submit_build_node($form, $form_state);
  $form_state['nodehierarchy_expanded'] = TRUE;
}