Node Comment allows you to create the content type as comment. Instead of having only comment title and body, Node Comment lets you add CCK fields to comment content type.
Normally, if we want to render the default node comment form, you can use the drupal_get_form() function.
<?php
print drupal_get_form('comment_form', array('nid' => arg(1)));
?>
But this does not work for Node Comment even if you provide the valid form id. Try the following code instead.
<?php
if (function_exists('nodecomment_render') && $node->node_comment) {
$node->node_comment = NULL;
print nodecomment_render($node, $node->cid);
}
?>
Done =)
Reference: Render nodecomments form in node.tpl

For me this prints the comments as well as the form, any idea how to just print the form?
LikeLike
i think i made a mistake on the code. please try the following.
<?php if (function_exists('nodecomment_render') && $node->node_comment) { $node->node_comment = NULL; print nodecomment_render($node, $node->cid); } ?>does it solve the problem?
LikeLike