How to get specific fields in the login form I'm trying to customize the login form. I added this to my template.php

function neptune_theme() {
  $items = array();
  $items['user_login'] = array(
    'render element' =&gt; 'form',
    'path' =&gt; drupal_get_path('theme', 'neptune') ,
    'template' =&gt; 'user-login',
    'preprocess functions' =&gt; array(
       'neptune_preprocess_user_login'
    ),
  );
  return $items;
}


and this is my user-login.tpl.php

&lt;p&gt;&lt;?php print render($intro_text); ?&gt;&lt;/p&gt;
&lt;div class="user-login"&gt;
  &lt;?php print drupal_render_children($form) ?&gt;
     &lt;div class="links"&gt;
    &lt;a href="/user/register"&gt;Create an Account&lt;/a&gt; | &lt;a href="/user/password"&gt;Forgot Password&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


I wanna know how to show the username, password and submit fields separately in the user-login.tpl.php file. I want to put the links for "Create an account" and "Forgot your password" before the Submit button.

I want to show something like



|Username                 |





|Password                 |



Create an Account | Forgot your password



|Submit|



Thank You. I hope it makes sense. :)
You can create a user login template. In your theme file, put this function in and replace your_themename with the machine name of your theme.

function your_themename_theme() {
  $items = array();
  $items['user_login'] = array(
  'render element' =&gt; 'form',
  'path' =&gt; drupal_get_path('theme', 'your_themename') . '/templates',
  'template' =&gt; 'user-login',
  'preprocess functions' =&gt; array(
  'your_themename_preprocess_user_login'
  ),
 );
return $items;
}


Then, you can split the individual fields of the form up in a template file called user-login.tpl.php and rearrange them however you want.

&lt;?php
    print drupal_render($form['name']);
    print drupal_render($form['pass']);
    print drupal_render($form['form_build_id']);
    print drupal_render($form['form_id']);
    print drupal_render($form['actions']);
?&gt;


Source: High Rock Media