[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);
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...
More information about the development