We will be covering the following recipes in this chapter:
Finding the form ID of a form
Changing the height of a textarea
Replacing Drupal's textareas with a WYSIWYG HTML editor
Reorganizing fields in a form
Replacing a standard submit button with an image button
Styling the comment form
Using a fieldset to group fields
Theming form elements from a module
Adding class attributes to form elements
Forms are an integral part of just about every site and Drupal provides a powerful interface to create and manipulate them through its Form API. The API abstracts the process of creating and managing complex forms, and standardizes the process with implicit importance placed upon security and reusability.
All said, however, the singular benefit of the Form API is the ability for Drupal modules and themes to alter and customize existing forms at will. It could well be argued that this API is Drupal's most powerful feature. The Field API, introduced into core with Drupal 7...