forum_form_forum

Versions
4.6 – 5
forum_form_forum($edit = array())
6
forum_form_forum(&$form_state, $edit = array())
7
forum_form_forum($form, &$form_state, $edit = array())

Returns a form for adding a forum to the forum vocabulary

Parameters

$edit Associative array containing a forum term to be added or edited.

▾ 1 function calls forum_form_forum()

forum_admin in modules/forum.module
Administration page which allows maintaining forums

Code

modules/forum.module, line 173

<?php
function forum_form_forum($edit = array()) {
  $form = form_textfield(t('Forum name'), 'name', $edit['name'], 50, 64, t('The name is used to identify the forum.'), NULL, TRUE);
  $form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5, t('The description can be used to provide more information about the forum, or further details about the topic.'));

  $form .= _forum_parent_select($edit['tid'], t('Parent'), 'parent][');
  $form .= form_weight(t('Weight'), 'weight', $edit['weight'], 10, t('In listings, the heavier (with a higher weight value) terms will sink and the lighter terms will be positioned nearer the top.'));

  $form .= form_hidden('vid', _forum_get_vid());
  $form .= form_submit(t('Submit'));
  if ($edit['tid']) {
    $form .= form_submit(t('Delete'));
    $form .= form_hidden('tid', $edit['tid']);
  }

  return form($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.