Problem/Motivation

Hello,
I am trying to produce the dependent field effect, as described here -> https://www.drupal.org/docs/8/modules/business-rules/advanced-usage/depe... using two Content types and a webform but i seem to make no headway. The reference field on the webform is not detecting the View to use.

Steps to reproduce

I have three content types (Continent, Regional Body and Country). The content type Regional Body has an entity reference field (Continent) to capture the Continent it belongs to and content type Country has an entity reference field (Regional Body) to capture the Regional Body it belongs to.

I am creating a webform for users to fill in and the first field is Continent, the second field (Regional Body) should filter and show only Regional Bodies (e.g. ECOWAS) that exist in the selected continent for the user to choose and, the third field should filter and show only Countries that belong to the body selected in the regional Body Field.
I have tried to reproduce the steps described here https://www.drupal.org/docs/8/modules/business-rules/advanced-usage/depe... and substituting the Taxonomy Vocabularies with Content Types and the Taxonomy Terms with Content. I also created the Entity Reference views as described and maintained to substitutions.

In the webform, all the three fields are added to the webform Using "Entity Select" Form Element Type and in the Entity Reference Settings box i used Content as the Type of item to reference. For the Continent Field I used the Default Reference method and selected Continent as the Content Type.
In the Regional Body and Country i selected Business Rules: Make field dependent using Views as the Reference method but it says "No eligible views were found. Create a view with an Entity Reference display, or add such a display to an existing view." .

Could anyone have a way to achieve what i am trying to realise?

Comments

crisigune created an issue. See original summary.

jatingupta40’s picture

Assigned: Unassigned » jatingupta40

I will work on it.