O'Reilly logo

Drupal 7 Fields/CCK by Dave Poon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding fields to comments

Drupal 7 allows us to add fields to comments; it was not possible to do this in Drupal 6 and earlier versions. Though you can write a custom module, by default Drupal 6 doesn't allow adding of fields in the comments form. In the cooking website, our client wants to add a text field that contains commenter e-mail addresses when they post a comment on the website.

Adding text fields to comments

We just learnt how to add a text field to the Cooking Tip content type. In this section, we will create a text field and attach it to the comments form.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required