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

Theming the confirmation page

We have the choice of changing the output of various aspects of Webform within the pertinent template files directly or by means of theme preprocessing functions.

The rule of thumb is that we should make changes within the template file if our coding contains more HTML than PHP logic, otherwise the coding should go into a preprocessing function. In this exercise, we're going to do a little of each to demonstrate the underlying principles.

How to do it...

Let's move on now and have a brief look at how we may interact with the internals of the Drupal theme layer.

  1. We need to make a copy of the webform-confirmation.tpl.php file from our speakers/templates folder and place it in our sites/all/themes/speakers directory.

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