function casetracker_form_comment_form_alter in Case Tracker 6
Same name and namespace in other branches
- 7 casetracker.module \casetracker_form_comment_form_alter()
Implementation of hook_form_comment_form_alter().
File
- ./
casetracker.module, line 323 - Enables the handling of projects and their cases.
Code
function casetracker_form_comment_form_alter(&$form, &$form_state) {
$node = isset($form['nid']['#value']) ? node_load($form['nid']['#value']) : NULL;
if (casetracker_is_case($node->type)) {
$form['#node'] = $node;
// add case options to the comment form.
casetracker_case_form_common($form);
// necessary for our casetracker_comment() callback.
$form['revision_id'] = array(
'#type' => 'hidden',
'#value' => $node->vid,
);
}
}