O'Reilly logo

Drupal 6 Theming Cookbook by Karthik Kumar

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 default text to the search textfield

This recipe will outline the steps required to add a default string of text to the search textfield. The text will only be visible when the field does not have keyboard focus.

Getting ready

We will be using the mysite module created earlier in this book to hold our odds and ends. It is assumed that this module has been created and is enabled. It is also assumed that the search module has been enabled and that the search field option has been activated for our theme and is visible on all pages.

We will be using a jQuery plugin named AutoFill from http://plugins.jquery.com/project/jQuery-AutoFill. It can also be downloaded directly from http://github.com/joemsak/jQuery-AutoFill.

How to do it...

The following ...

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