Embedding a content type node form with Drupal 6

Submitted by programmer on Tue, 01/20/2009 - 09:12.
::

How do you invoke or embed a content type node form in Drupal 6? Following code shows how to:

<?php
 
global $user;
 
$type 'garden';
 
$node = array('uid' => $user->uid'name' => $user->name
'type' => $type);
 
module_load_include('inc''node''node.pages');

  
$form drupal_get_form($type .'_node_form',  $node);

 
print_r($form);
?>

0 points

AHAH fields return error =(

Created by Anonymous

Post your Answer

  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options