node reference fail before submit I have custom_form, with Node_reference field.. When I add Any node and leave some require field then I submit .. the Node_reference fail and become [nid:und]

function custom_form_alter(&amp;$form, &amp;$form_state, $form_id) {
   $content_type_forms = array('register_node_form', 'session_node_form');
 if (in_array($form_id, $content_type_forms))
 {
 if(empty($form['field_event_ref']['und'][0]['nid']['#default_value']))
 {
 $form['field_event_ref']['und'][0]['nid']['#default_value'] = arg(3);
 }
 $form['field_event_ref']['und'][0]['nid']['#disabled'] = True;
}
}
if ($form_id == 'register_node_form'){
    global $user;
    if(isset($form_state['build_info']['args'][0]-&gt;field_event_ref[LANGUAGE_NONE][0]['nid'])){
       $nid = $form_state['build_info']['args'][0]-&gt;field_event_ref[LANGUAGE_NONE][0]['nid'];
    }  else {
    $nid = $form_state['build_info']['args'][0]-&gt;field_event_ref[LANGUAGE_NONE][0]['nid'] = arg(3);
    }
     $form_state['build_info']['args'][0]-&gt;field_event_ref[LANGUAGE_NONE][0]['nid'] = $nid;