You are here

function nodehierarchy_parent_selector_to_nid in Node Hierarchy 6.3

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

An element validator for the parent pulldown selector that retuns a nid for saving.

1 string reference to 'nodehierarchy_parent_selector_to_nid'
_nodehierarchy_get_parent_selector in ./nodehierarchy.module
Get the parent selector pulldown.

File

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

Code

function nodehierarchy_parent_selector_to_nid($element, &$form_state) {
  $selection = @$element['#items'][$element['#value']];
  if ($selection) {
    form_set_value($element, $selection['nid'], $form_state);
  }
}