5

I've got a parent child relationship between two content types: Properties and Parks. They are organized into a taxonomy we'll call Market. When creating a Park you select the Market it belongs to. Then creating a Property (which is child to a Park) you also select the Market and then select the Park it should be a child of. I need the select list of Parks (which is an Entity Reference) to filter based on what Market is selected to only show Parks from that Market. I have created an Entity Reference View properly and am able to see it filtering properly in the preview. But how can I use the data from the first select box for Market (a Term reference select list) to power the contextual filter of the second select box for Parks (an Entity Reference select list with the Entity selection set to filter by Entity Reference View).

I'm not sure if this is even possible, but have been stuck on it for a while.

  • For clarity: I need to use a select list that displays a taxonomy as a filter to another select list that displays entity references (with that taxonomy) on the add new content page. I have it working as a contextual filter for the view, but I don't get how to apply the filter from the select as the context. – circlecube Sep 6 '12 at 14:55
1

I was able to find a workaround to this and display the market (taxonomy) and park (parent) in a select list from a view. Then wrote some javascript to disable the options that are irrelevant (parks from other markets) once the user selects the market of the property.

0

From what I understand you need the Views Dependent Filters module. Here is a quote about it (from the module's project page):

Allows the presence of exposed filters on a view to be controlled by values in another exposed filter. Dependent filters are hidden when not relevant, and their values are not considered when the exposed form is submitted.

The module is compatible with both the Views basic and the Better Exposed Filters form plugins.

  • I've installed this module and tested it a bit, I am still not seeing how it applies to my question though. It seems like this module is for front-end? I'm looking to do this on the back-end. – circlecube Sep 5 '12 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.