I have created a Taxonomy Vocabulary and terms within those Vocabulary as below. 

Vocabulary1

-- Term1

-- Term2

Vocabulary2

-- Term3

-- Term4

I have created two fields

field1

field2

Field1 contains list of all the vocabulary. and Fields2 should contains of terms with reference Vocabulary selected in field1. Lets say Vocabulary1 is selected in Field1 then field2 should display term1 and term2. if vocabulary2 is selected field2 should contain the terms3 and term4.

I came across one article at https://www.drupal.org/docs/8/modules/business-rules/advanced-usage/depe... it gave a different approach to implement in different way using business rules. However I am getting following error when I implemented this.

[Wed Feb 07 19:48:20.069448 2018] [php7:notice] [pid 8356:tid 1340] [client ::1:52662] Uncaught PHP Exception InvalidArgumentException: "Field  is unknown." at D:\\VPSite\\journals\\core\\lib\\Drupal\\Core\\Entity\\ContentEntityBase.php line 509, referer: http://localhost/journals/node/add

when creating a content, having these fields.

Please help, in case I am missing some thing or if this is a bug in using the business rules please share how do i achieve this.

Thanks in advance.

Neeraj

Comments

Ivan Zugec’s picture

Have you tried Conditional Fields ? I've never used it to check the condition of a selected term but give it a go.

Neeraj420’s picture

Yes Conditional Field module is working fine as expected. the only hitch was, I was not able to find any documentation. So took time to get used to it.

Thanks for your help Ivan

Neeraj420’s picture

Is there any thing like this for views also?

HLopes’s picture

Neeraj420’s picture

This will display the fields based on conditions, however I was looking to use them in filter criteria section

Neeraj420’s picture

I am using the https://www.drupal.org/project/views_dependent_filters

it perfectly suits my requirement, however there is issues for which i have raise the issue.

kothinti’s picture

Hi Neeraj, did you find a solution for this? I too have the same problem. 

Neeraj420’s picture

I am using Views Dependent Filters for using same for views.