function aggregator_form_category in Drupal 4
Same name and namespace in other branches
- 5 modules/aggregator/aggregator.module \aggregator_form_category()
- 6 modules/aggregator/aggregator.admin.inc \aggregator_form_category()
- 7 modules/aggregator/aggregator.admin.inc \aggregator_form_category()
Generate a form to add/edit/delete aggregator categories.
1 string reference to 'aggregator_form_category'
- aggregator_menu in modules/
aggregator.module - Implementation of hook_menu().
File
- modules/
aggregator.module, line 317 - Used to aggregate syndicated content (RSS, RDF, and Atom).
Code
function aggregator_form_category($edit = array()) {
$form['title'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
'#default_value' => $edit['title'],
'#maxlength' => 64,
'#required' => TRUE,
);
$form['description'] = array(
'#type' => 'textarea',
'#title' => t('Description'),
'#default_value' => $edit['description'],
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
if ($edit['cid']) {
$form['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
);
$form['cid'] = array(
'#type' => 'hidden',
'#value' => $edit['cid'],
);
}
return drupal_get_form('aggregator_form_category', $form);
}