I am adding a comment form to a view, in fact, in this view I have 3 attachments, so when I finally added one form in the view.tpl.php through the code
$comment = new stdClass;
$comment->nid = arg(2);
$form = drupal_get_form('comment_node_project_form', $comment);
print render($form);
I can see there are 4 forms on the page, although I only need one form in that view, how to remove the additional ones ?
Use your code only in needed view.tpl.php. Templeates listed in “Theme information” of a view configuretion. You print your form in temeplate named yout_view_id_view.tpl.php or similar. I recomend you to read documentation on drupal.org.