Creating Custom Drupal 7 Registration Form I am trying to create a custom registration form on D7.
According to this article

The steps should be (theme name is icompany)


Modify template.php to override the registration form

function icompany_theme(&amp;$existing, $type, $theme, $path){
  $hooks = array();
  // Make user-register.tpl.php available
  $hooks['user_register_form'] = array (
    'render element' =&gt; 'form',
    'path' =&gt; drupal_get_path('theme','icompany'),
    'template' =&gt; 'user-register',
    'preprocess functions' =&gt; array('icompany_preprocess_user_register_form'),
  );
  return $hooks;
}

Create a second function which builds the form

function icompany_preprocess_user_register_form(&amp;$vars) {
  $args = func_get_args();
  array_shift($args);
  $form_state['build_info']['args'] = $args; 
  $vars['form'] = drupal_build_form('user_register_form', $form_state['build_info']['args']);    
}

Create user-register.tpl.php with the newly styled form


My problem is this does not work.  My custom form does not seem to be called.

The alternative approach is to create page--user--register.tpl.php.  This sort of works, any text I put on the page appears but the form fields do not using the syntax

&lt;?php
print render($form['account']['name']);
print render($form['account']['mail']);

?&gt;
I have tested the code and it's almost working as it's intended to be. One thing to note is when you placed the template file inside of the templates folder then the following should work.

On the icompany_theme() function, change the path value from 'path' =&gt; drupal_get_path('theme','icompany'), to 'path' =&gt; drupal_get_path('theme','icompany') . '/templates', which specifies to look for the file inside the templates folder.

Then flush your caches.