You are here

function casetracker_basic_project_form in Case Tracker 5

Same name and namespace in other branches
  1. 6 casetracker_basic.module \casetracker_basic_project_form()
  2. 7 casetracker_basic.module \casetracker_basic_project_form()

Implementation of hook_form().

File

./casetracker_basic.module, line 52
Enables a basic project node type for use with Case Tracker.

Code

function casetracker_basic_project_form(&$node) {
  $form = array();
  if (in_array($node->type, variable_get('casetracker_project_node_types', array(
    'casetracker_basic_project',
  )))) {
    $form['title'] = array(
      '#type' => 'textfield',
      '#title' => t('Title'),
      '#required' => TRUE,
      '#default_value' => $node->title,
    );
    $form['body_filter']['body'] = array(
      '#type' => 'textarea',
      '#title' => t('Description'),
      '#default_value' => $node->body,
      '#rows' => 20,
      '#required' => TRUE,
    );
    $form['body_filter']['format'] = filter_form($node->format);
  }
  return $form;
}