0

I have inserted comment form to my custom node.tpl via print drupal_render(drupal_get_form("comment_node_{$node->type}_form", (object) array('nid' => $node->nid)));. It works fine, but form isn't submitted when I click on Save button. It submits the data correctly to comment/reply/<nid>, but data aren't saved correctly and I'm only redirected back to node page.

I'm using current D7.

  • so - you're using a custom form for that ? can you submit this form elsewhere ? why don't you use the standard comment form and alter it according the nodetype ? – rémy Apr 5 '16 at 15:46
0

It was my mistake. I forgot, that I need to enable commenting on individual nodes. Sorry for this stupid mistake. Thanks @rémy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.