function nodesymlinks_node_form_submit_add in NodeSymlinks 7
Same name and namespace in other branches
- 6 nodesymlinks.inc \nodesymlinks_node_form_submit_add()
Add new symlinks item, submit handler for symlinks at node form.
See also
nodesymlinks_form_alter()
1 string reference to 'nodesymlinks_node_form_submit_add'
- _nodesymlinks_node_form_alter in ./
nodesymlinks.inc - Implements hook_form_alter().
File
- ./
nodesymlinks.inc, line 464 - Main NodeSymlinks callbacks
Code
function nodesymlinks_node_form_submit_add($form, &$form_state) {
// Set the form to rebuild and run submit handlers.
if ($_GET['q'] != 'system/ajax') {
node_form_submit_build_node($form, $form_state);
}
$form_state['rebuild'] = TRUE;
// Make the changes we want to the form state.
if ($form_state['clicked_button']['#value'] == $form['menu']['nodesymlinks']['add']['#value']) {
$items = element_children($form['menu']['nodesymlinks']['items']);
// Define new item count - will be used in form process to add new items.
$form_state['nodesymlinks']['item_count'] = count($items) + 1;
}
}