forum_form

Versions
4.6 – 5
forum_form(&$node)
6
forum_form(&$node, $form_state)
7
forum_form($node, $form_state)

Implement hook_form().

Code

modules/forum/forum.module, line 607

<?php
function forum_form($node, $form_state) {
  $type = node_type_get_type($node);

  if (!empty($node->nid)) {
    $forum_terms = $node->taxonomy_forums;
    // If editing, give option to leave shadows
    $shadow = (count($forum_terms) > 1);
    $form['shadow'] = array('#type' => 'checkbox', '#title' => t('Leave shadow copy'), '#default_value' => $shadow, '#description' => t('If you move this topic, you can leave a link in the old forum to the new forum.'));
    $form['forum_tid'] = array('#type' => 'value', '#value' => $node->forum_tid);
  }

  $form['#submit'][] = 'forum_submit';
  // Assign the forum topic submit handler.

  return $form;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.