Have you ever wondered why some fieldsets in some Drupal forms are just fieldsets, others are collapsible, but once you open (or minimize) them and save the form, their collapsed state is back to what it was before you edited the data? Well, this is due to a sad side of the generally great Drupal form API. While module developers may define fieldsets as "#collapsible" and even may define an initial "#collapsed" state, the one who is to use the form - eventually day by day - is let alone, as the way he configures his forms is never ever being recalled.
Just think of users having to create articles day by day, or just think of yourself as a site builder: How many times have they (or you) possibly sweared at the need to always open/close all these nice little fieldsets?
Well: Forget about it. This tiny shiny tool here solves the problem - even for anonymous users.
How does it work?
Whenever a user clicks on a collapsible fieldset header to toggle the "collapsed" state, the new state is being saved - uniquely for every form fieldset possible. Depending on the user's being registered with your site or not, this happens either in his user account data or locally on his computer using cookies.
When the same form is called the next time, the fieldset states are restored to what they were last time. For registered users, this happens already on your server while preparing the form. Anonymous users will still see a little form animation by an invisible hand but then also be happy with their favorite fieldset states.
For improved performance you may consider installing JS callback handler which integrates with this module.
Although fieldset helper addresses the same basic issue, it still uses a completely different approach which I would describe as more themer- and developer-focused, while this module here wants to be keep it simple and site owner-friendly (install, activate, ready).
Fieldsets which are added dynamically (via Ajax, that is) may still cause problems and at least not be rememberable.(Solved with 6.x-1.0-alpha1 and 7.x-1.0-alpha2.)
- In D6, the probably most annoying fieldset collection (the modules list, that is) is not yet being rendered the default way as all other forms are. It will take some deeper hack to get at this - if ever.
- As a matter of fact, the latter point applies, of course, to any fieldset that has not been created using the form API (and to all Drupal versions). This is known to apply to the following modules (please contribute to this list):
- Install the module the usual way.
- Set up role permissions to determine which roles may user server side storage via Ajax.
Comments, issues and suggestions are welcome. Enjoy!
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Administration, Content, Content Display, Site Navigation, Utility
- Reported installs: 57 sites currently report using this module. View usage statistics.
- Downloads: 819
- Automated tests: Enabled
- Last modified: July 11, 2013