You are here

function library_more_items_submit in Library 6.2

Same name and namespace in other branches
  1. 5.2 library.module \library_more_items_submit()
  2. 6 library.module \library_more_items_submit()

Submit handler to add another instance of a library item to a node form. This handler is used when javascript is not available. It makes changes to the form state and the entire form is rebuilt during the page reload.

1 string reference to 'library_more_items_submit'
library_form_alter in ./library.module
Implementation of hook_form_alter()

File

./library.module, line 355

Code

function library_more_items_submit($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['values']['library_more']) {
    $form_state['item_count'] = count($form_state['values']['items']) + 1;
  }
}