I need to be able to refresh the filter for a node reference field B basing to the value selected in a previous node reference field A, while creating (or editing) a node. Not as simple as Option Trim Module. Field A and field B are referencing to two content types that are referenced themselves, so Drupal must know which values of B correspond to each value of A.
I explain with an example: I have:
1) A content type "Delegation", with no relevant fields
2) A content type "Meeting Room", with a node reference field called "Delegation" to designate which delegation (unique) the room belong to.
Many meeting rooms may belong to the same delegation (a delegation may have many rooms)
3) A content type "Room Reservation", with two node reference fields: "Delegation" and "Room".
The idea is that when a user creates a new reservation (to reserve a meeting room), he first selects a Delegation and then selects a room BELONGING TO THAT DELEGATION. So only the rooms that belong to that delegation must be shown at the dropdown Room field.
Module "Option Trim" can do it, but it makes me to configure manually which rooms to show for each delegation, and this is not a logical running: database has that information already.
Is there any module to do this?
At configuration of "Room" node reference field (of "Reservation Content Type") I can call a View ("Rooms of a Delegation") for getting reference nodes, but I need a dynamic argument for that view getting the selected Delegation. Is it possible to use any code at the "Argument" field at the "Room" node reference field configuration?
Thant you very much.