Setting the default value for a text field as a variable in Form API I thought this would be straight forward but my lack of drupal knowledge is holing me back. I want to grab the email from the logged in user, and set it as the default value of the form. I can grab the email from the global user logged in, but cannot pass this to the form? 

The email field is blank, but I have the email stored in $email1 I want to place this value in the text box, as the default field.   

global $user;
    $user_full = user_load($user-&gt;uid); 
    $email1= $user_full -&gt;mail;
    echo $email1;

 $form['admin_email'] = array (
 '#type' =&gt; 'textfield',
 '#title' =&gt; t('Admin Email need email validation!!!'),
 '#description' =&gt; t('Please enter an Email'),
 '#default_value' =&gt; $user_full-&gt;mail,
 );
You don't need to use user_load($user-&gt;uid);. You already have a complete object inside global $user; variable. And don't forget PHP is not a natural languages. You can't just put whitespaces where you want them. In method call or property access, there should be no spaces around -&gt;, it should be right next to object, and property should be right after arrow.

This line is sufficient for me:

'#default_value' =&gt; $user-&gt;mail,