Fix for add input format to body

  1. <?php
  2. // add input format to custom node form
  3. // this goes in hook_form
  4.  
  5. //Get metadata for this node type defined in hook_node_info()
  6. $type = node_get_types('type', $node);
  7.  
  8. $form['body_filter']['body'] = array(
  9.   '#type' => 'textarea',
  10.   '#title' => check_plain($type->body_label),
  11.   '#default_value' => $node->body,
  12.   '#rows' => 20,
  13.   '#required' => TRUE
  14. );
  15. $form['body_filter']['filter'] = filter_form($node->format);
  16. ?>

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.