drupal_get_form of custom content types I am wracking my brain to try to figure out how to retrieve a custom content type's edit form programatically.

For example, I created a content type called "address", and have this:

$form = drupal_get_form("address_node_form");


But it does not work. I get back this warning: 


  Warning: call_user_func_array() [function.call-user-func-array]: First
  argument is expected to be a valid callback, 'node_form' was given in
  drupal_retrieve_form() (line 771 of
  /home/richardp/public_html/drupal7/d7/includes/form.inc).


I know that in D6 you also had to include an object where you specify the type, but I have tried this and it still doesn't work.

When I try simply $x = node_add("page"); I get a white screen of death, presumably because I ran into a PHP error.

Am I supposed to be including a file first or something like that?
Here is the code to display the Edit Form in Node View page:

&lt;?php
// modules/custom/custom.module

function custom_preprocess_node(&amp;$vars) {
    module_load_include('inc', 'node', 'node.pages');
    $node = $vars['node'];
    $form = drupal_get_form('mytype_node_form', $node);
    $vars['content']['edit_form'] = $form;
}
?&gt;


Notes:


You need to replace custom with your module's name and mytype with
the machine-readable name of your content-type.
I just used a clone of $vars['node'] to prevent probable problems
caused by the fact that $vars is passed by reference; though it
might not be necessary.