I am implementing a ticket tracking system for one of my customers that tracks hardware repair issues. We have a department, a contact for the department and a piece of hardware that belongs to the department. All three fields are autocomplete noderef fields.

What we would like to be able to do is filter the contact list and the hardware list on the node create/edit form when a department is selected. It looks like using the "Advanced-nodes that can be referenced" option is the way to go, but I can't figure out how to get the value of the department field passed to the view. I have read numerous threads on passing arguments, but it looks like passing the value of a form field as an argument may not be possible, or I am dense and just can't make it work.

Can I do this with the Advanced option or is this something that will require some custom coding/AJAXy goodness? Is there a module that provides this or similar functionality?

Thanks for your help


marcusx’s picture

I have a similar issue. I have two node reference fields on a node that represents a signup for an event. There are two node reference fields. One links the signup to the event and is created with the node reference URL widget. Another node reference field is a select list which links to an experience level node.

The event nodes and the experience level nodes share the same taxonomie terms. I want to filter the select list for the experience levels dependend on the taxonomie terms of the node that are selected with the URL widget.

To make it clearer:

  • I have a node id in the url from the node widget
  • The node with this id has some taxonomie terms
  • The nodes with the experience levels have taxonomy terms from the same vocabulary than the event node
  • I want to list only the experience level nodes in my node reference select list for the experience level which share the same taxonomie terms than the event

So my question is similar to the one from qjensen. How can I pass the id from the url to the view and get back only the nodes with the same taxonomie terms for my select list?

Thanks for any help!

tugis’s picture


qjensen’s picture

I know this thread has been here for a while, but I wanted to update this with my solution.

I ended up writing a module that used ajax to filter the second noderef field based on a selection in the first. I wrote an article describing how I finally got it all working. You can read it at http://www.scaled-solutions.com/blog/taking-control-drupal-autocomplete-....

The basic process is to write your own AJAX function, detach the original behavior and add yours in its place. The devil, as always, is in the details :)