I want to set the current user as a default for this field.
I was hoping the following code should do it , but no...
array(
0 => array('uid' => $user->uid)
);
(note that I am a drupal newbe :-) )
Thx
I want to set the current user as a default for this field.
I was hoping the following code should do it , but no...
array(
0 => array('uid' => $user->uid)
);
(note that I am a drupal newbe :-) )
Thx
Comments
Comment #1
pete-drupal commentedThis works for me: (maybe you forgot 'global'; see code below)
where CCKtype is the name of the CCK type and CCKUserRefField the name of the CCK field
Comment #2
pieter_degraeuwe commentedPerfect !
(I indeed forgot the 'global' ...)
Thanks a lot !