- I have Taxonomy called "Region" ex: (Region A / B / C)
- Each user is linked to Taxonomy "Region" using Profile2 module (one person can be linked to multiple regions)
- Content Type "Article" has a Term Reference field linked to same Taxonomy. (value = unlimited)
Requirement: . In content type "Article", I am asking user to select the Region (as Taxonomy Select list) where this Article belong too - how do I limit the Taxonomy list based on the Region user have an access too?
ex: User1 is linked to Region A / User2 is linked to Region A & B; When User1 creates an Article, Term Reference Taxonomy to show "Region A" but when User2 - show both "Region A" and "Region B"
in SQL world, I would write something like this.
select t.name from taxonomy t where t.name in (select p.name from profile p where user_id = :%1);
How would you achieve this in Drupal without writing custom code?
p.s: My apologies - I am from database world and very new to Drupal; still learning Drupal lingo.