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

Adding JavaScript tricks

Many websites feature a degree of interactivity where the web page physically changes as we make various selections or click on buttons. Drupal 7 ships with the jQuery JavaScript Library preinstalled, thus making it easy for us to take advantage of this powerful toolkit.

In this exercise, we're going to change the way our Speaker Registration form appears on screen based upon the First name entry field. Currently, when a user first arrives at our form they are shown two fieldsets, one for Speaker Details and another for Presentation Details. We're going to hide the Presentation Details fieldset until such time as the user enters a first name and moves on to the Last name field. If a first name has been entered the Presentation ...

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