0

I put this code in Drupal 6, and made a template file called "user-register.tpl.php" to override the default registration page.

function my_theme_theme(){
  return array(
    'user_register' => array(
      'arguments' => array('form' => NULL),
      'template' => 'user-register',
    ),
  );
}

With this, I could print profile user name, email and password.

<?php print drupal_render($form['account']['name']); // prints the username field ?>
<?php print drupal_render($form['account']['mail']); // print the email field ?>
<?php print drupal_render($form['account']['pass']); // print the password field ?>

This code doesn't print the profile field form.

<?php print drupal_render($form['profile_category_name']['profile_field_name'] ); ?>

Ideally I would like to print the form itself separately from the title, and the description so that I can arrange them with <table> tags.

0

I found out why it didn't work. Because my category name was not ASCII characters and it now works after changing them to ASCII characters with the code above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.