O'Reilly logo

Drupal 7 Development by Example Beginner's Guide by Kurt Madel

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 descriptive help text to our contact form

The core Contact module provides a decent out-of-the-box contact form for our site. But, what if we wanted to customize it a bit? Say, for example, that we wanted to add some help text to explain to the users why they should fill out the form. As we have seen in the previous chapters, there are usually multiple ways to accomplish customizations like this with Drupal. We are going to cover two different Drupal development recipes for creating an enhanced contact form for our d7dev site.

Using custom code to add help text to the contact form

The first approach will involve writing custom code by implementing a Drupal hook.

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