[support] changing default Register page

will hall will at theicarusproject.net
Sat Feb 17 19:30:25 UTC 2007


cool thanks jason. i am fwding this to one of our coders to look at.

-- will

Jason Flatt wrote:
> On Friday February 16 2007 12:40 pm, will hall wrote:
>> hacking user.module sounds more doable. the implication is that if there
>> is an upgrade we'd have to re-hack, right?
> 
> Yes, and that it's not the Drupal Way(tm).
> 
> It's really not that difficult. Put the following D5 code in a file named 
> zzz_mods.module in a relevant location in your sites directory, create a 
> corresponding .info file, enable it and tweak away. (I changed the titles to 
> both fields.) If these are not the fields you wanted to change, find the 
> relevant form definitions in the core files, copy, paste and tweak. (If they 
> are from a different form, you will need to update the case statement.) No 
> core hacking necessary, and probably very little, if anything, in the way of 
> tweaking for upgrades.
> 
> <?php
> function zzz_mods_form_alter($form_id, &$form) {
>   switch ($form_id) {
>     case 'user_register':
>       $form['name'] = array('#type' => 'textfield',
>         '#title' => t('This is where you type in your user name'),
>         '#size' => 30,
>         '#maxlength' => 60,
>         '#description' => t('Your full name or your preferred username; only 
> letters, numbers and spaces are allowed.'),
>         '#required' => TRUE,
>       );
>       $form['mail'] = array('#type' => 'textfield',
>         '#title' => t('This is where you type in your e-mail address'),
>         '#size' => 30,
>         '#maxlength' => 64,
>         '#description' => t('A password and instructions will be sent to this 
> e-mail address, so make sure it is accurate.'),
>         '#required' => TRUE,
>       );
>       break;
>   }
> }
> 



More information about the support mailing list