Book Image

Drupal 5 Themes

Book Image

Drupal 5 Themes

Overview of this book

Drupal is an award winning open source Content Management System. Based on PHP/MySQL, its power and flexibility combined with its exceptional design mean it is already on the way to becoming the de facto standard for CMS Websites. Drupal?¢‚Ǩ‚Ñ¢s modular design and structured source code make it both highly flexible and easily extended and modified. Drupal is extremely scalable, making it ideal for both a simple personal website as well as an industrial strength commercial or institutional web presence.Drupal is a model open source project in that it has a large, friendly community of people who contribute to the project in various ways. Drupal is not only free and easy to use, but this community provides on going mutual support.
Table of Contents (14 chapters)
Drupal 5 Themes
Credits
About the Author
About the Reviewer
Preface
Appendix A

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...