I would like to place on the front page of my Drupal site a form to collect email address and zip code that will redirect and feed into the Drupal user registration form.

Front page form:

Email _______
Zip _______
[Sign Up!]

on submission of front page form the /user/register form shall be this:

Username ________
Email __smail-submitted-from-Front-page-form__
[Create New Account]

What is the best way to achieve this? Thanks in advance.

Comments

Jerimee’s picture

this is helpful: http://drupal.org/node/257721

for Drupal 6:

<?php
$current_request = $_GET['q'];
$_GET['q'] = 'user/register';
print drupal_get_form('user_register');
$_GET['q'] = $current_request;
?>

The registration form is provided by the user module. You can non-intrusively change/override the form by implementing "hook_form_alter"

http://api.drupal.org/api/function/hook_form_alter/6