Drupal Association members fund grants that make connections all over the world.
OK, here's a fun one. There may or may not be an existing solution here, or it may need a new custom module. I am looking for advise on either one.
I have a node type, A. I have a group node type, G. There are many nodes of type G. I also have a Taxonomy vocabulary V, with over 100 terms in it. Nodes of type A can/must have one or more terms in vocab V.
Now, here's where it gets complicated. When assigning terms from vocab V to nodes of type A, we want them restricted to just those terms associated with the group of type G that the node belongs to. That is, we want to create a node and assign terms to it, where those terms are just those relevant to the node's group.
That seems straightforward, right? Terms can be associated to groups quite easily the same way as nodes in Drupal 7, which is awesome. However, there's no good way that I know of to do that sort of restriction in the UI.
If the node add form is built using Context Admin, then we could have the group provided as a context and then, with a custom Context Admin plugin, lock down the form to just that group and then custom filter the allowed values for the taxonomy reference with a custom widget that is Context-aware. That assumes, however: 1) Using context admin; 2) a node can be placed into only one group; 3) I can write a very specific widget; 4) that widget can be made Context-aware. That's a lot of assumptions that I don't think I can make.
If we're just using a normal node-add form, or we need to allow nodes of type A to be in multiple groups (as I do in this case), then I'm left with needing to make a new widget for taxonomy reference that is multi-value and somehow extracts client-side the current value of the group selector field and then filters itself client-side... AND then does the same filtering server-side. That also means loading up all terms in the vocabulary client-side so that we can show and hide them as the user changes the group selector, which runs into all kinds of fun performance problems. (At 100 terms, it's just a UI fail. At 1000 terms, it's a memory limit fail.)
So far, I do not have any good options. Are we going about this wrong? Is there something existing that will do the above? Is there a less crappy than I described new module to be written here?
I have at least 2 use cases for this, so input welcome. :-)