It would be great to be able to create dependencies within Field Collections that depend on fields within the parent node of the respective field collection item, as opposed to just other fields within the field collection (current method).

In Parent Node of Field Collection you have Fields A, B, C.
In a Field Collection within that node you have Fields D, E, F.
I would like to be able to trigger the display of D in the Field Collection if A is selected.
Wash, rinse and repeat with other items.

Please do not hesitate to ask me if you have any questions regarding this feature request.


kaizerking’s picture

It is much needed ,
conditional fields list should have all the fields available in host entity to manage dependency. now at present this of very limited use
Is there any other alternative module to mange dependency for all the fields in host entity including the fields in Field collection fields?

rv0’s picture

aha indeed, been looking for this feature too

it probably works like this because the field_collection is an entity on its own

kaizerking’s picture

Field collection plays "dual role", It works as a field and as well as entity. How ever a field collection filed is never or can never be a hostEntity. as per the documentation.To prove that all the fields can be listed from all the filed collections, there is working module which does this , Field Collection Views what this does is it extracts all the fields from hostEntity i.e all the fields from all the field collections of a host entity, the concept can be utilised for conditional fields purpose to list all the fields. the difference is it doesn't include the fields which are directly attached to the host entity.since conditional fields can do that part. i think it just some one should take it up to pull code from there.
What is required is the lists now we have as dependent and dependee should list all the fields , including the field collection fields and the fields within the field collection fields.

phenaproxima’s picture

I'd like to see this too.

ilanben’s picture

I'm really supporting to implement this too

lunk_rat’s picture

Issue summary: View changes

I want to add that I also have a use-case where I need to make certain field collection fields dependents of fields that exist on the host entity.

lunk_rat’s picture

Title: Create dependencies for Field Collection fields that rely on fields in the parent node » Expose fields from host entity as dependees for Field Collection fields.
bluesman2014’s picture

This would be a great function. Has anyone found a way of implementing it yet?

bluesman2014’s picture

I found a frontend workaround to this problem. Doesn't solve things on the server side, but it might be enough for you too.

I was trying to make certain fields visible or invisible depending on options that had been selected within a field collection (which clearly doesn't work using dependencies at present).

In my field collection field, I updated my radio button options from A, B, C to <span id="option-a">A</span>, <span id=option-b">B</span> etc. and made all the fields I wanted to toggle invisible via CSS (display: none)

I then created a script using document.getElementById("option-a") !=null thereby making other fields on the page visible when such and such an option 'exists'

mitch147’s picture

This functionality is definitely needed. The ability to hide different fields within a field set would greatly improve this modules functionality.

Has anyone figured out a way around this. I currently have an entity form with a field set and inside that field set there are fields that need to be visible/hidden depending on user input in the original entity form. Conditional fields does not allow this as of yet, is there any other way around this issue?

zlinedavid89’s picture

Sign me up for this feature as well. Would be incredibly valuable.