I just found this module and it looks like it is what i need. However, i cant figure out how to get it to work on a manually created (static html) fieldset in a block. I've searched how to override theme_fieldset, but I can't find any good tutorials or sample code to affect output of only one fieldset. It's a bit over my head.

I'm manually creating the fieldset in a block:

<script type="text/javascript" src="/misc/collapse.js"></script>
<fieldset id="editor-tools" class="collapsible collapsed">
<legend>Editor Tools</legend>
<ul>
<li><?php print flag_create_link('edpicks_artwork', $node->nid); ?></li>
<li><a href="/node/<?php print $node->nid; ?>/edit">Edit this Page</a></li>
</ul>
</fieldset>

Any suggestions?

Comments

jrockowitz’s picture

I think you just need include the fieldset helper script in your above snippet.

<script type="text/javascript" src="/sites/all/modules/fieldset_helper/fieldset_helper.js"></script>

Note, if you do include the fieldset_helper.js script it will save the state of every fieldset on the page. This module currently does not support selectively saving a collapsible fieldset's state.

~ jake

clockwood’s picture

Thanks, that worked like a charm!

jrockowitz’s picture

Status: Active » Closed (fixed)