I've created a views from comments. I want to have add comment form at the button of my views (in footer). so I installed "views_php" module and add "Global: PHP" to footer and write this code to print add comment form in footer.
$comment = new stdClass; $comment->nid = $row->nid; $form = drupal_get_form('comment_form', $comment); print render($form);
but the problem is that I don't have comment_body or any other custom field in the printed form. actually just author, subject and save button.
I tried this code too:
print drupal_render(drupal_get_form("comment_form", (object) array('nid' => $data->nid)));
print drupal_render(drupal_get_form("comment_node_news_form", (object) array('nid' => $results->nid)));
but none of them worked properly!