function tripal_pub_form_alter

2.x tripal_pub.module tripal_pub_form_alter(&$form, &$form_state, $form_id)
3.x tripal_pub.module tripal_pub_form_alter(&$form, &$form_state, $form_id)
1.x tripal_pub.module tripal_pub_form_alter(&$form, &$form_state, $form_id)

File

tripal_pub/tripal_pub.module, line 791
The Tripal Publication module allows you to search the PubMed databse for academic articles, that relate to user specified tpoic\s. As well, it allows management of publications so that a user can enter specified details regarding a desired…

Code

function tripal_pub_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == "tripal_pub_importer_setup_form") {
    // updating the form through the ahah callback sets the action of
    // the form to the ahah callback URL. We need to set it back
    // to the normal form URL
    if ($form_state['values']['action'] == 'edit') {
      $form['#action'] = url("admin/tripal/tripal_pub/import/edit/" . $form_state['values']['pub_import_id']);
    }
    if ($form_state['values']['action'] == 'new') {
      $form['#action'] = url("admin/tripal/tripal_pub/import/new");
    }
  }
  if ($form_id == "tripal_pub_search_form") {
    $form['#action'] = url("find/publications");
  }
  if ($form_id == "chado_pub_node_form") {
  }
}