Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Drupal 5 Themes

You're reading from   Drupal 5 Themes Create a new theme for your Drupal website with a clean layout and powerful CSS styling

Arrow left icon
Product type Paperback
Published in Dec 2007
Publisher Packt
ISBN-13 9781847191823
Length 260 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Toc

Modifying and Overriding Form Functions


The key to obtaining flexibility in the theming of Drupal forms lies in the creation and manipulation of theme functions specific to a particular form. As already noted, the forms have few pre-existing themeable functions. There are some exceptions, for example the generic functions found in forms.inc, and the dedicated functions for the Search Forms and the Polls module, but by and large the theming of forms must be accomplished without the benefit of dedicated themeable functions.

To get control over what is happening inside the form—the fields, the data labels, etc.—you have to create your own overrides to modify specific elements of the form function in question.

Note

For basic changes to the styling of a form, you may not need to create a new function; you may be able to achieve your goals through manipulation of the default styling in the CSS, as discussed below.

It is possible to create overrides and make modifications to the various form functions...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image