I'm having a heck of a time customizing my user register form. I can successfully register function via HOOK_theme either using the render element or the variables key:
function greenc_theme($existing, $type, $theme, $path) {
return array(
'user_register_form' => array(
'template' => 'templates/user-register',
//'render element' => 'element',
'variables' => array('form' => NULL),
),
);
}
If I use the variables key I need to grab my form so I do this:
function greenc_preprocess_user_register_form(&$variables){
$variables['form'] = drupal_get_form('user_register_form');
}
So now i have user_register_form available in my template as $form. So I can do what I need like so:
*Indicates required field
Your Information & Reports Location
<?php
print drupal_render($form['field_first_name']);
print drupal_render($form['field_last_name']);
print drupal_render($form['field_user_jurisdiction']);
print drupal_render($form['field_title']);
print drupal_render($form['field_organization']);
print drupal_render($form['field_phone']);
print drupal_render($form['account']['mail']);
print drupal_render($form['field_confirm_email']);
print drupal_render($form['account']['name']);