It would be easier to point you in the right direction if you give a broader description of your goal. Why are you trying to add a form to your node type? Are you trying to add fields to a node? Is this a form the user will fill out? If so, you might want to look at the [Webform][1] module.

You want to avoid putting this into your node template. Generally you want to keep "business logic" (any php functions other than print) out of template files. You might be better served by creating this as a block and placing it below or above the node because it is more reuseable. If you don't want to use a block you can use [hook_node_view()][2] and add an additional element to $node->content as in the linked example.


  [1]: http://drupal.org/project/webform
  [2]: http://api.drupal.org/api/drupal/modules%21node%21node.api.php/function/hook_node_view/7