What I want is a collapsible group of fields in display mode, not edit mode.
I'm following what is shown at http://drupaleasy.com/quicktips/create-collapsible-jquery-boxes-drupal This works if I place the code inside the body field and don't filter any html. But I want to collapse groups of fields, not the content of a body field. So I need to know how to insert the necessary class="collapsible" and other attributes into what is already being generated by the CCK module.
Here is code inserted into the body of a page (that works):
<fieldset class="collapsible collapsed"><legend>Examples</legend><p>This is how you collapse code. Now what?</p></legend></fieldset>
Here is code generated by the CCK module (that needs additional elements, such as the class="collapsible" attribute):
<fieldset class="fieldgroup group-examples"><legend>Examples</legend><div class="description">This is the description of the Examples group</div><div class="field field-type-text field-field-example-calls"> <div class="field-label">Example Calls: </div> <div class="field-items"> <div class="field-item odd"> http://reviews/reviews.json?apiversion=5.1&passkey=kuy3zj9pr3n7i0wxa... </div> <div class="field-item even"> http://reviews/data/reviews.xml?apiversion=5.1&passkey=kuy3zj9pr3n7i... </div> </div></div></fieldset>
How do I do this? All I can find is how to modify fieldsets in forms, not in nodes. I want the collapsing to occur in display mode, not edit mode. Do I override a .tpl file? If so, which one and how? By writing a module? Any help would be appreciated.