I am trying to hide/unhide some part of a large multigroup table, and it works nicely enough on first page load but sadly on adding more fields the js doesnt seem to be taking affects.

I know this due to the fact of the ahah calls but is there a way i can hide/collapse part of the form as form fields are loaded via _add_more ?

Comments

markus_petrux’s picture

Title: Multigroup » Hiding parts of Multigroup?
Status: Active » Fixed

You should be able to analyze the form using combination of hook_form_alter() + using a recusrive function invoked from pre_render or after_build callback. Please, see CCK Handbooks, CCK for Developers. I wrote a couple of code snippets there. So, the same technique could be applied here.

Another option is that you can implement hook_field_access() to deny access to a field conditionally. See CCK Private Fields module for an example.

Yet another option: you can override theme functions related to multigroups.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.