0

As you know comments are displayed like this:

enter image description here

So it shows the subject, and then says: Comment and shows the comment body.

So I have a new field in comment table called "paragraph_id", so before the comment subject, I want to say: Paragraph Number: and then display the value in paragraph_id value.

How can I do it? Which hook should I use?

  • Hacking new fields into existing core tables is a bad idea - you should really use the field system that Drupal provides. Then you can do all this through the UI – Clive Oct 10 '14 at 15:14
  • @clive, So what is that field system that Drupal provides? I have to mention that I have used hook_form_comment_form_alter, hook_form_comment_form_validate, hook_form_comment_form_submit hooks for adding my new field. – user3530082 Oct 12 '14 at 16:58

Your Answer

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

Browse other questions tagged or ask your own question.