Generally it's not good to create the elements in the ajax callback. What I usually do is add the form elements to the main form, but wrap them in the if statement, and then in the ajax callback just refresh the container of that element or the whole form if it's small.
function SOMETHING_form($form, &$form_state) {
$form['nominee'] => array(
'#type' => 'checkbox',
'#title' => t('I am nominating someone else'),
'#ajax' => array(
'callback' => 'return_nominee_email_element',
'wrapper' => 'nominee-email-wrapper',
'progress' => array('type' => 'none'),
),
),
if(isset($form_state['values']) && $form_state['values']['contact_details']['nominee'] == TRUE) {
$form['nominee_email'] = array(
'#type' => 'textfield',
'#title' => t('Email'),
'#required' => TRUE,
'#prefix' => '<div id="nominee-email-wrapper">',
'#suffix' => '</div>',
);
} else {
$form['nominee_email'] = array(
'#prefix' => '<div id="nominee-email-wrapper">',
'#suffix' => '</div>',
);
}
return $form;
}
function return_nominee_email_element($form, &$form_state) {
return $form;
}
See if something like that works for you.