forum_form_forum
Definition
forum_form_forum($edit = array())
modules/forum.module, line 173
Description
Returns a form for adding a forum to the forum vocabulary
Parameters
$edit Associative array containing a forum term to be added or edited.
Code
<?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);
}
?> 