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
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

peterpoe - December 9, 2008 - 10:13

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

Roulion - December 9, 2008 - 11:35

Thank you for taking it into account. It's obvious such an enhancement can only begin after a fisrt official release

#3

peterpoe - December 20, 2008 - 01:06
Status:active» postponed

#4

upupax - January 7, 2009 - 01:57

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

kaay - May 26, 2009 - 01:53

Having the same problem. I would be also interesting in additional feature. Thanks

#6

kenorb - July 26, 2009 - 12:26

#7

maverick14 - October 2, 2009 - 09:48

+ 1 who wants this feature :)

#8

Roulion - October 3, 2009 - 10:21

if think the idea could be like "herarchical select" but for cck lisbox fields...

#9

design.er - November 30, 2009 - 16:27

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

trupal218 - December 1, 2009 - 00:01

subscribing - i agree that this would be a great feature that will allow lots of flexibility

#11

peterpoe - December 2, 2009 - 13:42
Title:nested conditions» Allow nested conditional fields
Version:6.x-1.x-dev» 6.x-2.x-dev
Status:postponed» active

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

mani.atico - December 2, 2009 - 18:23

+1

 
 

Drupal is a registered trademark of Dries Buytaert.