You are here

function addanother_form_alter in Add Another 5

Same name and namespace in other branches
  1. 6 addanother.module \addanother_form_alter()
  2. 7.2 addanother.module \addanother_form_alter()

Implementation of hook_form_alter().

File

./addanother.module, line 85
Presents users with an option to create another node of the same type after a node is added.

Code

function addanother_form_alter($form_id, &$form) {
  if (isset($form['#node']) && $form['#node']->type . '_node_form' == $form_id) {
    $form['#submit']['_addanother_message'] = array(
      $form,
    );
  }
}