Textfield default value to user email NOT WEBFORM I am using the Drupal 6 Form API to build a custom form. I am not using the Webform module or CCK. How do I assign the user's email as a default value for a form element?

I know about #default_value =&gt; but I do not know what to assign to this.
In your form function, you can add global $user; at the top. Then in your #default_value you can use $user-&gt;mail.