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
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

System Message - October 9, 2009 - 16:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.