O'Reilly logo

Drupal 7 Webform Cookbook by Douglas Vernon Denny

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

Defining custom option lists

Webform enables developers to create predefined lists that can be used to populate select lists. Instead of applying a copy-and-paste methodology for frequently used lists on a website, we can create an extension module that makes such option lists available to all Webform select components.

Apart from the time saving this represents to administrators creating Webforms, we will only need to make changes in one place to affect all Webform components making use of a custom list.

This is a developer activity and the following task description assumes some knowledge of PHP and Drupal programming.

Getting ready

Let's get the ball rolling by creating a folder to house our extension module. In the sites/all/modules folder of ...

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