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 |
Jump to:
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
Postponing all compatibility with non-core cck modules to future releases.
#2
#3
The same problem here #373954: doesn't work with content_profile_registration.module on Registration form.
#4
What have to be done to make it working?
#5
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
i to need this so +1
#7
Have offered to help fund moving this along. Any other contributions?
#8
i could test some things, but i am no coder
#9
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
@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
I also would very much like this feature.
#12
@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
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
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
+1 Subscribed for conditional fields inside a multigroup section
#16
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