Drupal form and comments

I need to insert the comment form directly into the node template (I use node -type.tpl.php for the node theme).

In a related issue, if I go to / comment / reply / NID, I get a comment form, but it only has a preview button and a submit button. The preview button does nothing when pressed.

Thanks for the help!

+3
source share
2 answers

Check the comment settings in node-type in the admin / content / node -type / yourNodeType section. Inside a (usually compensated) set of fields for comment parameters, you can choose whether to display the comment form on a separate page or on the same page as node.

As for the missing submit button, you can change the "Preview comments" option from required to optional.

As for the preview button, which does nothing, it sounds strange, and I have no idea what might cause it - clicking on it will usually lead to viewing the entered comment with the option to finally send it. If this problem persists, you should open a separate question for this.

+3
source

node -type.tpl.php. . .

, , , - .

  • node

    • node -

  • node

    • node -

  • -

, .

. http://api.drupal.org/api/drupal/modules--comment--comment-wrapper.tpl.php

+1

Source: https://habr.com/ru/post/1734873/


All Articles