[support] Default PHP Code for CCK field

Jim Li jimmydami at gmail.com
Fri Nov 2 18:57:00 UTC 2007


Try this:

global $user;
return (array( 0 => array('uid' => $user->uid)));


On Nov 2, 2007 9:00 AM, Chris McCreery <chris.mccreery at gmail.com> wrote:
> Same one I mentioned earlier, the "configure cck field" page reloads and at
> the top in nice red box is:
>
>  The default value php code returned an incorrect value
> Expected format : array(
>  0 => array('uid' => value for uid),
>  // You'll usually want to stop here. Provide more values
>  // if you want your 'default value' to be multi-valued :
>
>
>  1 => array('uid' => value for uid),
>  2 => ...
> );
> Returned value :
>
>
>
> Thanks
>
>
> On 11/2/07, Xavier Bestel <xavier.bestel at free.fr> wrote:
>
> > Le vendredi 02 novembre 2007 à 08:33 -0400, Chris McCreery a écrit :
> > > Thanks guys but still the same none descriptive error. I tried both of
> > > the suggestions but no luck.
> >
> > Please describe the non-descriptive error.
> >
> >
> > --
> > [ Drupal support list | http://lists.drupal.org/ ]
> >
>
>
>
> --
> Chris McCreery
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>


More information about the support mailing list