Community

Problem with geetting node form with drupal_get_form

Hello!

I need to get the node creation form with drupal_get_form.
But every time I get empty array.
I have tried several solurions from forums - but nothing work unfortunately.
For example thi one not working

module_load_include('inc', 'node', 'node.pages');
    $node = $node_form;
    print drupal_get_form('tur_node_form', $node);

Thanks!

Comments

<?phpmodule_load_include('inc

<?php
module_load_include
('inc', 'node', 'node.pages');
$type = 'some_node_type';
$form = node_add($type);
?>

Jaypan We build websites

Thanks, it works!

Thanks, it works!