Simplification to hook_form
Magnity - September 25, 2009 - 16:15
| Project: | Storm |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Creating an issue so to get an issue number to reference on commits...
All implementations of hook_form within Storm modules can be simplified as per this extract from the api.drupal.org node example module:
<?php
if ($type->has_body) {
// In Drupal 6, we can use node_body_field() to get the body and filter
// elements. This replaces the old textarea + filter_form() method of
// setting this up. It will also ensure the teaser splitter gets set up
// properly.
$form['body_field'] = node_body_field($node, $type->body_label, $type->min_word_count);
}
?>
#1
Automatically closed -- issue fixed for 2 weeks with no activity.