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?