ARCHIVE
Adding a collapsible fieldset to your nodes
Editor's note: This page attempts to demonstrate how to make a collapsible form fieldset appear on a page without actually using a form. While the results are pretty, semi-functional, and even slightly cool, this method is a no-no for semantics, usability, and even breaks the basic rules of HTML. A better way to do this would be to use jQuery to toggle the collapse/expand of a styled div. When someone posts a HowTo on doing exactly that, this page will be deleted and redirected to the better, safer jQuery method.
This method has not been tested in Drupal version 5.x, but will most likely work.
The Collapsible Fieldset is a drop-down area you see underneath a titled section. For example, on the Settings page (Administer » Settings) you see the titled sections such as:
- General settings
- Error handling
- Cache settings
- etc...
When you mouse click on any of these titles, the area expands below displaying the information corresponding to the section.
I found this feature useful to incorporate on node pages that are long. Instead of using a page break, a teaser, or read more option, you can use the Expandable / Collapsible Fieldset Feature. This method also works well when you want to initially display half of a table.
