Hello:
I'm trying to include the user_register form in a multistep form process. I've also altered the user_register form with custom fields. I've tried a couple different methods to achieve this:
1. I have tried to alter the user_register form and turn it into the first step of my multistep form. I kept receiving errors in form.inc. (= Use existing form as first step.)
2. I want to include the altered user_register form in the first step of my multistep form. (= Include existing form as first step.)
My curent code looks like this:
function register_menu($may_cache){
$items = array();
if ($may_cache){
$items[] = array(
'path' => 'penregister',
'title' => t('Join'),
'callback' => 'drupal_get_form',
'callback arguments' => array('register_multiform'),
'type' => MENU_CALLBACK,
'access' => TRUE
);
}
return $items;
}
function register_multiform($form_values = NULL) {
if (!isset($form_values)) {
$step = 1;
}
else {
$step = $form_values['step'] + 1;
}
$form['step'] = array(
'#type' => 'hidden',
'#value' => $step,
);
switch ($step) {
case 1:
$output=drupal_get_form('user_register');
print $output;
break;
case 2:
$form['memberdues'] = array(
'#title' => t('Member Dues'),
'#type' => 'fieldset'
);