Re-using / Customizing content types I have constructed a content type, 3 fields are timestamps.

I wish to reuse this content type (form input etc) to a client facing application, with the caveat being the form is modified. For example my module should be able to tweak the form (ie: Hiding the timestamps fields and updating them accordingly).

I don't want to rebuild the whole form and muck with the CCK API to get data to persist, so I am wondering if it is possible to simply re-call that form and it's functionality and tweak it ever so slightly???

I found this googleing: 

//Showing a node edit page with drupal_get_form() and hook_menu()

And implemented some of it:

function _tasks_create() {
  module_load_include('inc', 'node', 'node.task');

  $nid = '1';
  $node = node_load($nid);

  return drupal_get_form('task_node_form', $node);  
}


function tasks_menu() {
  $items = array();

  $items['tasks/create'] = array (
    'type' =&gt; MENU_CALLBACK,
    'title' =&gt; t('Create New Task'),  

    'page callback' =&gt; '_tasks_create',
    // Where is $node coming from???
    'page arguments' =&gt; array('task_node_form', $node),

    'access arguments' =&gt; array('create tasks')    
  );

  return $items;
}


But I see two immediate issues:


$node in hook_menu is undefined -- where do I get it from??
I have no idea what the $nid (Node ID) will ever be for my content type


I need to essentially re-display the form that I use in the admin, hiding everything but maybe three fields (that means no URI, menu options, etc).

I will probably need to hook into the submission of the form in this context only and update the timestamps accordingly.

What am I missing or doing wrong? Any ideas?

Alex
Clive's answer is right.. You can not pass $node object before you created yet. If you want to show the same form which is shown in the /admin section you can do something like this:

function tasks_menu() {
  $items = array();

  $items['tasks/create'] = array (
    'type' =&gt; MENU_CALLBACK,
    'title' =&gt; t('Create New Task'),  
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('task_node_form'),
    'access arguments' =&gt; array('create tasks')    
  );

  return $items;
}


and:

function task_node_form($form, &amp;$form_state) {
  $form = array();
  $node = new stdClass();
  $node-&gt;type = 'YOUR TYPE';

  field_attach_form('node', $node, &amp;$form, &amp;$form_state, $langcode = NULL, $options = array())

  // Other code
}