Hi,
I was wondering if anyone can tell me how to create a custom registration form? I know how to add fields to the registration form using the profile module but the information that I ask for I don't want it to be displayed on the users profile or allow them to change it. I want to be the only one to see it and access it. Is there any way of doing this or any module that can do this. I'm still fairly new with using Drupal and don't have much experience with PHP. Any help you can give would be apperciated. Thanks

Comments

zareen’s picture

You could use webform for gathering the other information. But it may not be integrated in the way you wish.
www.drupal.org/project/webform

Knightman1701’s picture

Thanks for your help. Can this be used to add more fields to the registration page or does this have to be used seperate from the main registration page?

aharown07’s picture

I also need to customize my registration form. Read the Theming Guide but I can't find info on what template is responsible for the registration form.
Specifically, I just want to add some special instructions at the top.
Just don't know what to override.

aharown07’s picture

Just found some more in the theme guide... didn't know to search for "user_register"
Still could use some help here though. I can't find a user-register.tpl.php file anywhere and I don't want to build the whole thing from scratch, just tweak it a little.

aharown07’s picture

Found code in theme guide for adding function mycoolcustomtheme_theme () to template.php along w/some preprocess stuff and then a template file.
Here's the problem in my case: I'm using a subtheme of Zen based on zen_classic. So in my template.php, that function is already declared, and when I add the code I get a "cannot redeclare" error.

So I figure I need to add it to the already existing function mytheme_theme(), but they look quite a bit different and since I'm not a php coder, I'm not sure how to do that.
The code in my template.php file is this.... .

<?php
function zen_iron_theme(&$existing, $type, $theme, $path) {
return zen_theme($existing, $type, $theme, $path);
}
?>

("zen_iron" is the name of my subtheme)

The code in question in the theme guide looks like this...

<?php
function yourtheme_theme() {
  return array(
    'user_login' => array(
      'template' => 'user-login',
      'arguments' => array('form' => NULL),
    ),
    'user_register' => array(
      'template' => 'user-register',
      'arguments' => array('form' => NULL),
    ),
    'user_pass' => array(
      'template' => 'user-pass',
      'arguments' => array('form' => NULL),
    ),
  );
}
?>

I'm only interested in the middle part that messes with user_register.

So... perhaps someone could help me figure out how to use the guide code in my zen subtheme situation? Should I put it in the template.php of the main theme (zen)?

xbro’s picture

--

asd123asd5’s picture

<?php
function themename_theme(&$existing, $type, $theme, $path) {
  $hooks = zen_theme($existing, $type, $theme, $path);
  
  $hooks['user-register'] = array(
      'template' => 'user-register',
      'arguments' => array('form' => NULL),
    	);

}
?>
aharown07’s picture

In 6.x there is already a field at admin/user/settings for custom instructions.

Still interesting in learning how to use the override system for the form though, but now it's just curiosity.