FIELDSET element is used to group related fields together and can be seen extensively in Drupal forms. While we saw how to inject markup in the previous recipe to group fields from a styling point of view, in this recipe we will be looking at grouping related fields of the contact form using two separate fieldsets.
We will be using the mysite module created earlier in this book to hold our customizations. As we are altering the contact form, it is assumed that the contact module is enabled and configured with at least a couple of contact categories via its management page at
admin/build/contact (Home | Administer | Site building | Contact form). Enabling the module automatically makes a menu item ...