Posted by a.sopko on January 5, 2013 at 8:29pm
Hi!
I try to display "add comment form" on node edit page, but can't get the rignt object, or arguments to pass to the form builder, here the code ->
print drupal_render(drupal_get_form('comment_form', $node));
this seems to work, but there are some errors, like missing argument
Comments
Is $node defined?
Is $node defined?
yes, via node_load
yes, via node_load
!!! Here is solution
!!! Here is solution ->
<?php
$comment = (object) array(
"nid" =>!!! YOUR-NODE_WHERE-COMMENTS-GO!!!!,
);
print drupal_render(drupal_get_form('comment_node_!!!YOUR-CONTENT-TYPE!!!_form', $comment));
?>
If you have truble, feel free to contact me