I want to add separate comment form for each node showed in a view. I used template row using following code:
$comment = new stdClass;
$comment->nid = strip_tags($fields['nid']->content);
$form = drupal_get_form('comment_form', $comment);
print render($form);
Form is showed, but doesnt work properly. When I click on save, instead of saving the comment it redirect me to following url: comment/reply/35 (in case I try to add a comment for node 35)
Regards
You can do this using hook_form_alter, you may change $form['#action'] and edit the action form to your custom url.
This post can be helpful to change the destination url after submitting the comment.