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 list fields

We have learned how the Boolean field type works in Drupal, it can set one of two values, true/yes/1 or false/no/0. What if we need to create a field to have a selection list? For example, we would like to create a list of options, with which the users can give a rating to the post. The list should have Best, Good, Normal, Bad, or Very Bad as options. The users can select one of these options to vote.

In order to create something like that, the list module provides us a list field type to create a selection list.

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