[support] Default PHP Code for CCK field

Chris McCreery chris.mccreery at gmail.com
Thu Nov 1 15:48:21 UTC 2007


I'm sure this is an easy one for you php coders but I'm a bit confused as to
what is currently populating my dropdown list as it is now.

I have created a CCK for user reference, but I would like the default
value(or selected value) of the dropdown list to be the current user but
then list out the other users available, I'm not sure of the code to use for
the PHP Code portion of the default value.
global $user;
return array(0 => array('value' => $user->name));

That's as far as I got. Sorry.


-- 
Chris McCreery
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20071101/98bcaf1c/attachment.htm 


More information about the support mailing list