I'm hoping there's a rocket scientist out there that can help me with this!!
I am using the following entities:
- Machine Type (Taxonomy)
- Ink Type (Taxonomy)
- Ink Configurations (Taxonomy)
- Machine (Content Type)
- Customer Machine (Content Type)
The Machine Type, Ink Type & Ink Configurations taxonomies have an Entity Reference field added to them which references the Machine content type.
The Machine content type has entity reference fields for Machine Type, Ink Type & Ink Configurations.
I'm using Corresponding Entity References on the Machine content type & the 3 associated taxonomies to keep the references bi-directional.
The Customer Machine content type has the following fields (partial list): - Customer (Entity Reference) - Machine Type (Entity Reference) - Machine (Entity Reference with Reference Field Option Limit by Machine Type) - Ink Type (Entity Reference with limit by Machine) - Ink Configuration (Entity Reference with limit by Machine)
The user should first select the Customer, followed by the Machine Type. Selecting the Machine Type should filter the available Machines. Selecting the Machine should filter the Ink Type & Ink Configuration options.
All of this works as it should but then I tried to add Conditional Fields to the process.
The Ink Type & Ink Configuration settings should only be visible when certain Machine Types are selected as some Machine Types do not make use of ink.
When you choose the Machine Type, the Machine entity reference gets limited as desired but when you select a Machine, it exposes the Ink Type & Ink Configurations field regardless of the Machine Type selected.
If I remove the Reference Option Limits on the entity reference fields then the Conditional Fields module works as intended.
I'm guessing I could try adding each Machine to a new Conditional fields dependency but this makes maintenance a problem as I would need to modify the dependency each time a new machine gets added.
Sorry for the long post but I'm hoping that clarifies the details of my scenario.
I'm using: - Drupal 7.3x - Conditional Fields 7.x-3.0-alpha1 - Reference Option Limit 7.x-1.x-dev (latest at time of writing)
I have also applied this patch to Reference Field Option Limit so that multiple fields can react to the same filtering field. In this case both Ink Type & Ink Configuration react to Machine.
Any assistance in this regard would be most appreciated because I'm somewhat clueless when it comes to module development & troubleshooting!!
So far, I've made a basic module that uses hook_form_alter to change the cardinality of the Ink Types & Ink Configurations fields by setting #multiple to false on the Create Customer Machine form but removing/disabling my module has no impact on the above scenario.
Just off the top of my head... Could Rules and/or Rules Forms Support be of assistance here?
Please help the noob!! :)
Unfortunately I can only post 2 links being a new member.
All of the module URLs start with https://drupal.org/project/ and end with their short names as below: