Allow nested conditional fields
Roulion - December 9, 2008 - 08:58
| Project: | Conditional Fields |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hello everyone,
As i suggested before, think it could be nice if we can implement nested conditions. I see 2 ways:
hypothesis:
we have 3 fields
field_1 = {a1 ; b1; c1 }
field_2 = {a2 ; b2; c2 ; d2 ; e2 ; f2}
field_3 = {a3 ; b3; c3 ; d3 ; e3 ; f3 ; g3}
1st kind of condition: multi conditions based on the same field
IF field_1 = {a1 } => field_2 = {a2 || b2}
IF field_1 = {b2} => field_2 = {c2 || d2}
IF field_1 = {c2} => field_2 = {e2 || f2}
1st kind of condition: multi conditions based on the same field
IF field_1 = {a1} => field_2 = {a2 || b2}
IF field_2 = {a2} => field_3 = {a3 || b3 || c3}
IF field_2 = {b2} => field_3 = {d3 || e3 ||f3 ||g3}
Would you think that may be possible

#1
If I understand right, you are proposing:
1) That a controlled field can also be a controlling field at the same time.
2) That a field can be controlled by more than one field at the same time.
The 2nd feature is simpler, as it needs only upgrading of the javascript logic. It would be nice though if it were possible to set whether the controlling fields should be all triggered (AND), or just one of them (OR).
The 1st feature needs a bit more coding, as we have to avoid fields controlling their controller's controller (conditional loops!).
Implementing both these features would also probably require a new interface for the setup of the conditional fields, so that one can have a visual representation of the hierarchic structure.
We can start studying on this, but actual implementation should be probably postponed after the first official release of cf.
#2
Thank you for taking it into account. It's obvious such an enhancement can only begin after a fisrt official release
#3
#4
I'd like to have this feature too..
But I think it could be enough just to have the first field passed as argument to the second one, so that you can use it to display allowed value with php: do you think it could be possible?
#5
Having the same problem. I would be also interesting in additional feature. Thanks
#6
Marked #527466: How controlled field could be controlled as duplicated.
#7
+ 1 who wants this feature :)
#8
if think the idea could be like "herarchical select" but for cck lisbox fields...
#9
After the first official release is out now - which is awesome :) - are there plans to realize this feature?
IMO the first approach of comment #1:
That a controlled field can also be a controlling field at the same time.would be great/useful.Regards,
Stefan
#10
subscribing - i agree that this would be a great feature that will allow lots of flexibility
#11
Any contribution is welcome on this feature. It is a very big feature, so its priority is lower than other important and easier features for Conditional Fields 2.0, but I mark it as active anyway to attract attention.
#12
+1