function story_form in Drupal 4
Implementation of hook_form().
File
- modules/
story.module, line 79 - Enables users to submit stories, articles or similar content.
Code
function story_form(&$node) {
$form['title'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
'#required' => TRUE,
'#default_value' => $node->title,
'#weight' => -5,
);
$form['body_filter']['body'] = array(
'#type' => 'textarea',
'#title' => t('Body'),
'#default_value' => $node->body,
'#rows' => 20,
'#required' => TRUE,
);
$form['body_filter']['format'] = filter_form($node->format);
return $form;
}