By Big Monkey on
global $user;
return array(array('value'=>$user->mail));I can use that code to return the user's e-mail address if I place it in the "Default" php code area.
Can someone please show me a similar method to retrieve custom content type fields?
Comments
Node Load
Hi
You can get cck fields by node_load({nid}) function
eg $node = node_load($nid);
you can see all fields value at
print_r($node);
--
Kuldip Gohil
Global Software Consulting (Gloscon)
1-888-DRUPAL-9 (378-7259)
http://www.gloscon.com
Awesome, finally an
Awesome, finally an answer!
Unfortunately, I'm new to PHP as well as Drupal.
Would you be kind enough dumb it way down for me? I tried using "$node = node_load($nid);" in the PHP field for the default value, but am getting errors.
bump
bump