1

I am not rendering any results. This is my template.php:

function fueldeluxe_theme($existing, $type, $theme, $path) {
  $items = array();

  /**
   *  Account edit Forms
   */

  $items['user_profile_form'] = array(
    'render element' => 'form',
    'template' => 'user-profile-form',
    'path' => drupal_get_path('theme', 'fueldeluxe') . '/templates'
  );

  return $items; 
}

function fueldeluxe_preprocess_user_profile_form(&$variables) {
  $variables['account'] = drupal_render($variables['form']['account']);
  $variables['picture'] = drupal_render($variables['form']['picture']);
}

This is my user-profile-form.tpl.php:

<div id="account-settings">

  <div id="profile">
    <?php echo $picture; ?>
  </div>
  <div id="account">
    <?php echo $account; ?>
  </div>
</div> 

As you can see I'm trying to load the user profile field forms. However I'm not able to render any results. The page loads okay when I add dummy text but no account field forms.

Do I need a module for this to work?

Also what would the variable look like for calling the custom field added to a user?

1
  • 1
    Consider re-wording your questions title. I would also recommend 'recapping' the question you're referencing. – Citricguy Feb 7 '12 at 6:00
0

I'm struggling with what you're asking in the first portion of your question, but looking into the previous Stack Exchange page you referenced you can use the Panels module to quickly accomplish two column layouts for these forms. You can also use template overrides to change the layout of the registration pages.

If you're specifically looking to quickly implement a tabbed UI for the user profile, I believe the Profile2 module may offer a built-in solution.

"Also what would the variable look like for calling the custom field added to a user?"

You may need to use load_user() first to get a complete user object to access custom profile fields.

$account = user_load(<USER-ID>); //$node->uid or $user->uid
1
  • I edited to question for clarity. – user5378 Feb 8 '12 at 0:14