Compatibility with CCK submodule content_multigroup

pkej - January 12, 2009 - 03:37
Project:Conditional Fields
Version:6.x-1.x-dev
Component:Compatibility w/ other modules
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Description

I can create a normal group and have the conditional values be turned on or off. If the group is a multigroup, it doesn't work, all the form elements are visible, even the conditional ones.

The content_multigroup module has to be turned on by creating a content_multigroup.info file, read the README.txt.

#1

peterpoe - January 24, 2009 - 14:45

Postponing all compatibility with non-core cck modules to future releases.

#2

peterpoe - January 24, 2009 - 14:46
Status:active» postponed

#3

kenorb - February 20, 2009 - 12:36

#4

kenorb - February 20, 2009 - 11:56
Status:postponed» postponed (maintainer needs more info)

What have to be done to make it working?

#5

bfsworks - June 15, 2009 - 20:28
Status:postponed (maintainer needs more info)» needs review

As the multigroup module is now apart of an official cck dev branch, now might be to time to take a look at integrating this functionality.

#6

lasac - August 1, 2009 - 08:42

i to need this so +1

#7

bfsworks - August 4, 2009 - 14:49

Have offered to help fund moving this along. Any other contributions?

#8

lasac - August 5, 2009 - 20:48

i could test some things, but i am no coder

#9

servantleader - August 7, 2009 - 21:47

Easy fix:

On line 618:
Change:

if ($controlled_fields[$element]) {
  // Group markup is still hardcoded.
  $form[$element]['#prefix'] = '<div id="conditional-' . conditional_fields_form_clean_id($element) . '" class="conditional-field controlled-field">';
  $form[$element]['#suffix'] = '</div>';
}

To:
if ($controlled_fields[$element]) {
  // Group markup is still hardcoded.
  $form[$element]['#prefix'] = '<div id="conditional-' . conditional_fields_form_clean_id($element) . '" class="conditional-field controlled-field">' . $form[$element]['#prefix'] ;
  $form[$element]['#suffix'] = $form[$element]['#suffix'] . '</div>';
}

By overwriting #prefix and #suffix this module breaks any other module that adds markup. This needs to be fixed throughout the module. Someone that has the time can make this into a patch.

#10

peterpoe - August 15, 2009 - 22:45
Title:Conditional fields does not work with CCK submodule content_multigroup» Compatibility with CCK submodule content_multigroup
Component:Code» Compatibility w/ other modules
Category:bug report» feature request
Status:needs review» postponed

@servantleader: committed your proposed fix to dev, thanks!

@bfsworks: I answered to your message: if all you needed was controlling multigroups as a whole, this fix is enough. But if you need to make fields controlling/controllable inside a multigroup, there's a lot more work to do...

Changing this issue to tracking bug for full compatibility with content_multigroup.
(Question: anyone knows if there will ever be a cck 3 for Drupal 6, or if it will only be for D7?)

#11

jpweber - August 16, 2009 - 21:56

I also would very much like this feature.

#12

Splicer - September 22, 2009 - 21:39

@peterpoe You say servantleader's fix in #9 is enough for controlling multigroups as a whole? Does this mean I should be able to make a multigroup appear and disappear based on a controlling field? I'm asking because I'm not seeing that and I don't know whether I simply misunderstood or if it isn't working for me.

#13

Miria - October 9, 2009 - 23:24

I have the same question, and wondering if I misunderstood #10. I am using the dev branch of this module because I very much need this feature with multigroup, but the multigroup that I have set as controlled still seems unaffected by the controlling field.

#14

Miria - October 13, 2009 - 15:49

Correction to my above post: the dev version does work with multigroup. What it doesn't work with is Fieldgroup Tabs. When I disabled the fieldgroup tabs module, the controlled multigroup disappeared just like it was supposed to. However, with the module enabled, all the fields in the multigroup do disappear, but the "empty" tab still remains. So scratch what I said above, the dev seems to work fine with the basic multigroup.

#15

jeff.k - October 19, 2009 - 01:03

+1 Subscribed for conditional fields inside a multigroup section

#16

neopulse - November 16, 2009 - 17:44

It doesn't work for me, I changed to the dev version ans apply the fix in #9, but i can make a conditional multigroup, I mean appear and disappear. Even in the multigroup config page i can find the section conditional field that appear in others fields.
How you make the multigroup be conditional.
Excuse my english please

 
 

Drupal is a registered trademark of Dries Buytaert.