You are here

function casetracker_form_alter in Case Tracker 7

Same name and namespace in other branches
  1. 5 casetracker.module \casetracker_form_alter()
  2. 6 casetracker.module \casetracker_form_alter()

Implements hook_form_alter().

File

./casetracker.module, line 516
Enables the handling of projects and their cases.

Code

function casetracker_form_alter(&$form, &$form_state, $form_id) {
  if (!empty($form['#node'])) {
    $node = $form['#node'];

    // Add case options to our basic case type.
    if (casetracker_is_case($node->type)) {
      $default_project = null;
      if (!isset($node->nid) && is_numeric(arg(3))) {
        $default_project = arg(3);
      }
      casetracker_case_form_common($form, $default_project);
    }
  }
}