hi i get this error message when i select an option from my custom form for user registration.
Notice: Undefined index: mail in user_account_form_validate() (line 1207 of C:\wamp\www\soccerleague\modules\user\user.module).
this is my hook_form_alter code.
function soccerleague_form_alter(&$form, &$form_state, $form_id) {
$form['#tree'] = TRUE;
if(empty($form_state['values']['soccer_user_team']['team_division']))
$form_state['div_select'] = 1;
else
$form_state['div_select'] = $form_state['values']['soccer_user_team']['team_division'];
$div_select= $form_state['div_select'];
if($form_id == 'user_register_form'){
$options= getSoccerDivision();
$form['soccer_user_team']= array(
'#type'=> 'fieldset',
'#title'=> t('My team name'),
);
$form['soccer_user_team']['team_division']= array(
'#type'=> 'select',
'#title'=> t('Select Division'),
'#description'=> t('select the division your team is in'),
'#options'=> $options,
'#ajax'=> array(
'callback'=> 'soccer_getdivision_callback',
'wrapper'=> 'user_register_division_wrapper',
),
);
$form['soccer_user_team']['team_name'] = array(
'#type'=> 'select',
'#title'=> t('Team name'),
'#description'=> t('select the team you are playing for'),
'#options'=> getSoccerTeamName($div_select),