I have a content type called "enquiry". I want to embed the node creation form at various places throughout my website. How do I do this via PHP?
+1
A:
sounds like a job for the webform module. if you really want to go the cck route you can try something like this:
$node = new stdClass();
$node->type = 'store_review';
module_load_include('inc', 'node', 'node.pages');
$output = drupal_get_form('store_review_node_form', $node);
print $output;
Deric Braito
2010-08-04 12:09:17
Just as I found it. :-)
RD
2010-08-04 12:13:10
A:
Solution:
$node = new stdClass();
$node->type = 'enquiry';
module_load_include('inc', 'node', 'node.pages');
$output = drupal_get_form('enquiry_node_form', $node);
print $output;
RD
2010-08-04 12:12:50