This patch enables support for CCK multigroups, which at present break cck_fieldgroup_tabs. The issue is that multigroups wrap themselves in a DIV for AHAH callbacks, which cause the tab DIV to be wrapped as well, and then lost when the user triggers multigroup's AHAH functionality, typically by clicking "add another value."

This does actually needs to be a patch to the tabs module, not cck_fieldgroup_tabs, because the relevant code is in the pre_render and theme functions.

I'm not totally comfortable with the CSS used here to format the fieldset properly after the AHAH call, but if you need multigroups and tabs *right now*, as I do, this patch will do it.

CommentFileSizeAuthor
tabs-with-multigroup.patch2.92 KBnetaustin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nedjo’s picture

Status: Active » Needs work

Thanks for the patch.

I haven't used multigroups yet so I'm not clear on the details of what's needed.

I don't want tabs module to have logic specific to other modules, so what I think we need to do here is change the cck multigroup code to set #prefix and #suffix properties on the tab pages and, I guess, a [#attributes][class] property, and then run it through drupal_attributes() in the theme function.

EHA’s picture

Subscribing.

Multigroups also seem to break vertical_tabs which like cck_fieldgroup_tabs is dependent on Tabs module. The issue crops up also when clicking "add more values".

benoitg’s picture

Subscribing

Bilmar’s picture

subscribing

izarco’s picture

Thank's for this patch, it work for me.

rconstantine’s picture

For anyone using the nested fieldgroups patch to CCK (http://drupal.org/node/300084#comment-3387918), some time ago I had added this other patch: http://drupal.org/node/325049 to cck_fieldgroup_tabs which takes advantage of an additional hook I added to CCK to allow modules to place their AHAH stuff in the right spot.

I have only loosely been following the progression of the nested fieldgroups patch since I initially wrote it, so I don't know whether the cck_fieldgroup_tabs patch still works or not, but from what I have read, it might.

clashar’s picture

subscribe