How to change "user/register" page?

1 reply [Last post]
Last seen: 5 years 1 week ago
Joined: 2011-07-09

want to add more fields and elements to the page ".../user/register", how do i do that?

I know I can use hook_form_alter (right?).. but wanted to know the details on how to do that. I tried the code below - did not work - what is wrong?

I created a module to do that, module name: "userreg"

What am I doing wrong here? Any direction is greatly appreciated!

function userreg_menu_alter() {

$items['user/register'] = array(
'title' => 'Customized Registration Screen',
'page callback' => 'drupal_get_form',
'page arguments' => 'my_login_form',
'access callback' => 'user_is_anonymous',



function my_login_form(){
$login = array(
'#title' => "Checkbox I just added to user/register",
'#type' => 'checkbox',

return $login;


Last seen: 7 years 7 weeks ago
Joined: 2011-06-26

I'm confused. You said "I know I can use hook_form_alter (right?)" but then your function is not named userreg_form_alter(), it's named userreg_menu_alter(). Am I missing something?

Add to playlist

Add to , or

Add to new playlist:

Add to playlist
This is a member-only feature
But, it's easy to become a member

Add to cart:

Contact us

Below are the supported keyboard shortcuts for our video player.

Start / stop video
Go to next video
Go to previous video
Increase or decrease player speed by 20%
Skip ahead or go back by 15 seconds
Jump to a percentage (2 is 20%, for example)
Toggle full screen
Videos Pricing More Search
BuildAModule Logo Icon BuildAModule Logo Icon
Become a member!
1 month
6 months
10% off
12 months
20% off
All memberships come with the following:
24 / 7 access to the entire 1800+ video library
An innovative video player with a rolling transcript
Extensive Drupal and cross-platform training
A thorough and thoughtful training style
Progress tracking
Take notes on specific video sections
Intuitive multi-user management
How many users?
Go solo with a single user, or give multiple team members access through one account and get discounts by bundling multiple users into a single membership.