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

nevets’s picture

Is $node defined?

a.sopko’s picture

yes, via node_load

a.sopko’s picture

!!! Here is solution ->

$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