Hi, I tried many times, but the module still not work.

Suppose there are three content types, articles, cities and countries.

1. cities have a entity reference field which referred to countries node type.
2. countries do not have entity reference.
3. articles have two entity reference fields, one is referring to cities, another is referring to countries.

I tried to enable the "Limit this field's options according to matching field values" in these three entity reference fields,
but there is only one "body" matching field there.

How could I make this module work? Thanks.

Comments

joachim’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

> a entity reference field which referred to countries node type
> another is referring to countries

These two things must be the ***SAME FIELD***. Have you set that up properly?

(This is clearly stated in the docs, I think. If not, please suggest how to improve them!)

Micha1111’s picture

So steps for right configuration are:

1. Create contenttype "countries"

2. Create some nodes of contenttype countries

3. Create contenttype "cities" with an entity reference field to contenttype countries (i.e. "inCountry" - List widget)
To check "Limit this field's options according to matching field values" is not nessesary

4. Create some nodes of contenttype cities

5. Create contenttype "locations" (or something else) with two entity reference fields:

At first: Entity reference field to contenttype countries (chose => add an existing field !! => "inCountry" !! - List widget)
To check "Limit this field's options according to matching field values" is not nessesary

Second field: Entity reference field to contenttype cities (chose => add new field !! => i.e. "inCity" !! - List widget)
Now check "Limit this field's options according to matching field values" => now field "inCountry" is available !!

6. Create nodes of contenttype locations
If you click on an evailable country in field "inCountry" an ajax operation for limitation of available cities in field "inCities" will start.

Perhaps, this is an improvment of your docs ?

efarseer’s picture

This guideline really help me make this module work now! Thanks!!!

GBain22’s picture

#2 was great information - finally got it working

legolasbo’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Fixed

Marking this issue fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.