I have created a node-###-tpl.php in which I collect the user info via:

// Access the user object
global $user;
//Load profile fields from database
profile_load_profile($user);

I can see it in my node by including the following in node-###.tpl.php:

print '<pre>'.$user->uid.'</pre>';

before print $content

On this node, in the 'Description' section (Full HTML w/ Flash input format), I have created form with a text box that I want to populate with $user->init (email address). The code I've tried is:

<input type="text" name="email_1" size="20" maxlength="30" value=$user->init></td>

For the life of me, I can't get the value of the user's init to populate the text box. When I attempt to use value=$user->init I get a box that contains "$user-" with "init>" immediately to the right of the box. Obviously, if I include quotes, the the result displays the text $user->init, not the value.

Sure could use some help on this!

Comments

jerry.drupal’s picture

value= print $user->init