I have a user reference field that uses comment_cck, where users may link themselves to the article (recommend it).

Problem is that I can't create a list with views containing the field's current value AND current user's username.
I want to view only those values, much like the "assigned to"-value in the issue tracker here at drupal.org.

Can this module help me solve this?

Comments

farald’s picture

Title: Can option trim do this? » Can option trim make a list of current value AND current user only?
cyu’s picture

No, this module cannot do this. In d5 what you want would be a simple implementation of hook_form_alter where you could set ['#options'] for your user reference to the $user->uid and the default value. In d6 this won't work for you, though, because ['#options'] won't get set until after the form_alter. This module can help you solve this if you want to look at the implementation and write your own custom module.

The idea would be for you to form_alter in a pre-render function for your field. Then in this function you can redefine the #options for that element.

If Drupal.org's implementation is what you are looking for perhaps you'd be better off finding out how they have that working.

farald’s picture

Status: Active » Closed (fixed)

Ok. I will investigate further how to use theme overrides to input the values from the template.

Thanks for your help cYu! :)