function nodesymlinks_node_form_submit_add in NodeSymlinks 6
Same name and namespace in other branches
- 7 nodesymlinks.inc \nodesymlinks_node_form_submit_add()
Add new symlinks item, submit handler for symlinks at node form.
See also
1 string reference to 'nodesymlinks_node_form_submit_add'
- _nodesymlinks_form_alter in ./
nodesymlinks.inc - Implementation of hook_form_alter().
File
- ./
nodesymlinks.inc, line 440
Code
function nodesymlinks_node_form_submit_add($form, &$form_state) {
// Set the form to rebuild and run submit handlers.
node_form_submit_build_node($form, $form_state);
// 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 - it will be used in form process to add new
// items.
$form_state['item_count']['nodesymlinks'] = count($items) + 1;
}
}