Closed (fixed)
Project:
Conditional Fields
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2009 at 14:27 UTC
Updated:
30 Jan 2011 at 01:00 UTC
I have seen posts about nested fieldgroups but nothing about fieldgroups in general.
I cannot get this to work if the conditional fields are in a fieldgroup. They work fine outside of it. Is this a known issue? I am using the CCK 3.x dev version so that may be a part of it.
Anyone?
Comments
Comment #1
Bilmar commentedsubscribing
Comment #2
rconstantine commentedif the controller and field are in the same group, it works. i think that's in the documentation. what you are after is "cross-group" controllers/fields.
Comment #3
jeff.k commentedI just did a fresh install and its still not working. All fields show and there is no contitional behaviour.
If this is supposed to be working, the only think I can think it might be is I am using "6.x-3.x-dev (2009-Dec-06)" of cck.
Comment #4
jeff.k commentedi just tested "6.x-2.6" of cck and it is also not behaving in a field group.
Comment #5
JThan commentedHello.
I can confirm. Inside a fieldgroup this is not working.
Not working (Fields in a Group):
Group
- Field A (controls Field B)
- Field B (is controlled by A)
Working (Fields not in a Group):
Field A (controls Field B)
Field B (is controlled by A)
I am using 6.x-2.6 of this Module on drupal 6.14
so what rconstantin is saying is not right. It does not work inside a group for me.
Comment #6
JThan commentedThe fields inside a group are not wrapped with the conditional field divs. I do not know the reason. Just thought that info could maybe help with seeking the problem.
My try of starting to explore this, you do not need to read this.
Inside a group the controlled field is not wrapped by
<div id="conditional-field-example" class="conditional-field controlled-field" style="display: none;">and the controlling field not by<div id="conditional-field-relatedlinks" class="conditional-field controlling-field conditional-field-processed">.Fields are not wrapped - Look in conditional_fields.module for function to wrap.
Find:
which is called by
Here the fields are fetched from database - checked entry in Database. Both entries are there and good.
And here it stopps for now.
Comment #7
samkat12 commentedremoved to another issue http://drupal.org/node/453204
Conditional field is causing fields to be required even if they were not set up to be required. the situation is that when you place the controlling filed out side group and the cotrolled field in a group, the system does not allow you to save, it produces an error message that fields in group are required. even if the fields have been filled in. How ever there is no error if the controlled field is not triggered.
[...A..] controlling field out side Group
[...B...] Controlled field in a group. (produces an error message that the fields in the group are required to be filled in even if i have put data into them). Can any one help?
Comment #8
JThan commented@samkat12: Please open a new report for that after you serached the issue queue and did not find an appropiate issue (Maybe here: http://drupal.org/node/453204). We still have our first problem in here not solved and I do not see how your problem is related to ours.
@maintainer , all: Setting this to critical, because this is a key feature of this module not working. Please change if you think it is not critical but to me the module is not working as intended.
JThan
Comment #9
samkat12 commentedOK. I will Move it to the appropriate issue thread. thanks. probably to http://drupal.org/node/453204
Comment #10
peterpoe commentedJust committed a fix to 2.x-dev.
Comment #11
JThan commentedWorks for me.
Thank you.
Comment #12
samkat12 commentedyes new dev version works.Thanks.
Comment #13
Netbuddy commentedUsing the latest CCK 6.x.3 dev (had the latest 6.x-2 - same story) and the latest Conditional Field and im getting "You can't change the parent group of a conditional field."
I have a form with:
Job Details
+ Occupation - Triggering field
+ Occupation - Other - Triggered field when the user selects "other" from the occupation select dropdown
+ Pay Rate
+ Job Description
+ Job Location
+ Hours - Triggering field
+ Hours - Other - Triggered field when the user selects "other" from the hours select dropdown
So i have a pair of conditional fields with this fieldgroup, and I cant save either to appear within it.
Comment #14
peterpoe commented#13 This is by design, since not all combinations of conditional fields and groups are possible (that is: fields inside controlled groups can only control or be controlled by fields in the same group). You can move the field first by making it not controlling and not controlled by anything, then changing group, and lastly making it conditional again.
We could make the message more informative, and the error appear only when the move would actually cause problems. I'm filing a new bug about this.
Comment #15
Netbuddy commentedYour workaround works a treat. Thank you :)
Comment #17
danny_joris commented#14 Thanks. Nice workaround, indeed!
Comment #18
johnhanley commentedI just experienced this issue today and peterpoe's instructional workaround works as described. Thanks for that.
I understand the technical reason behind it, but this behavior is rather clunky. A permanent solution should really be devised. In the meantime better messaging would help.
In any event, thanks for the useful module.