views:

301

answers:

1

Hi all,

I'm trying to create a view to limit the options available to a user for a CCK NodeReference field. I want to pass the current user's ID as an argument to the view that selects the options for the CCK NodeReference field. Basically when the user creates a new item, I only want them to be able to reference a node which they created (not someone else's node). I've got a view set up that accepts a user ID as an argument, but how do I pass the current user's ID to the view from the CCK NodeReference field?

Thanks in advance!!!

+2  A: 

Open the view, click on the user id argument and click provide default argument, select User ID from logged in user. Choose the "user" validator, and optionally select to restrict the view to particular roles.

Finbarr
Worked beautifully, thanks!
Chaulky

related questions