[development] Get the form for a node

Ms. Nancy Wichmann nan_wich at bellsouth.net
Mon Jun 13 00:24:03 UTC 2011


You can look at the node.module (probably actually node.pages.inc?) and get the form name, but I think it is actually "node_form_type." And I believe you'll need to recast the object to an array. Something like,

$form = drupal_get_form('node_form_article', (array) $node);

 
Nancy
 

Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.



>________________________________
>From: Fernando Conceição
>
>
>I have searched a lot, but dont find the right way to do this.
>So what i want is to load the form for a node, the same form as if i am editing a node, something like:
>
>$node = node_load(1);
>$form = drupal_get_form('article_node_form', $node);
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110612/f5be0fb5/attachment.html 


More information about the development mailing list