Is there some way to have a node reference select list that does not contain node titles? I created a filtered view to list certain nodes by a single field they have other than title, but the title is still automatically appended to the end of each choice in the select list.

For example, say I have a node with title Cactus that has a field field_height=5. I create a view with only field field_height, and then associate a node reference field to that view. In the node reference select list:
5 - Cactus

But I wanted just:
5

Comments

crocodyl’s picture

Interesting, I am trying to do the exact opposite, maybe you can help.

I just want to display the node id, and another value. They both show up in the view and in the node reference picklist, but not on the published page. Any ideas?

threexk’s picture

Version: 5.x-1.6-1 » 5.x-1.7
doublejosh’s picture

Hello,

What's the best way to pass the user's id to the view for the node reference? I don't seem to be getting it by just listing "uid is author." I've had success by just doing "current user is author", but what about actually passing variables?

karens’s picture

Status: Active » Closed (won't fix)

Closing old issues. None of us is using the D5 version any more, so hard to provide any support. Sorry.

Chris Gillis’s picture

Version: 5.x-1.7 » 6.x-2.8
Component: Views Integration » nodereference.module
Category: support » bug
Status: Closed (won't fix) » Active

I think this should be reopened, as the issue still exists in D6.

In summary,
The issue occurs when creating a node reference field and filtering it by selecting a view.
If my view uses the node "title" field, everything works fine.
If my view uses a different field, then my noderef widget will list the view output, AND the node title, separated by a hyphen. It seems that it should ONLY output what the view outputs.

(I'm using a select list, haven't tested with autocomplete)

Chris Gillis’s picture

Status: Active » Closed (duplicate)

Just found the same issue here with a nice workaround in #16
http://drupal.org/node/303209