I save form data using hook_form_alter() but the data don't appear when editing the node from the UI I implemented hook_form_alter() to insert few fields. I implemented hook_node_insert() to save the field data, hook_node_load(), and hook_node_view().

Everything works fine, but when I edit the node, the edit form appears with no data. 

How can I fix this?

function mymodule_form_ABC_node_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $options_first = _mymodule_get_first_dropdown_options();
  $selected = isset($form_state['values']['filed_1']) ? $form_state['values']['field_1'] : key($options_first);

  $form['field_1'] = array(
    // …
  );
  $form['field_2'] = array(
    // …
  );

  return $form;    
}

/**
 * Implements hook_node_insert().
 */
function mymodule_node_insert($node) {    
    db_insert('my_custom_table')
      -&gt;fields(array('nid' =&gt; $node-&gt;nid, 'field_1' =&gt; $node-&gt;field_1, 'field_2' =&gt; $node-&gt;field_2,))
      -&gt;execute();
}

/**
 * Implements hook_node_load().
 */
function mymodule_node_load($nodes, $types) {
  foreach ($nodes as $node) {
    $nids[] = $node-&gt;nid;
  }

  $result = db_select('custom_table', 'e')
    -&gt;fields('e', array('nid', 'filed_1', 'field_2'))
    -&gt;where('e.nid IN (:nids)', array(':nids' =&gt; $nids))
    -&gt;execute();

  foreach ($result as $record) {
    $nodes[$record-&gt;nid]-&gt;field_1 = $record-&gt;field_1;
    $nodes[$record-&gt;nid]-&gt;field_2 = $record-&gt;field_2;
  }
}


/**
 * Implements hook_node_update().
 */
function mymodule_node_update($node) {
  if ($node-&gt;type == 'abc') {
    // Delete the existing values.
    db_delete('custom_table')
      -&gt;condition('nid', $node-&gt;nid)
      -&gt;execute();

    db_insert('custom_table')
      -&gt;fields(array('nid' =&gt; $node-&gt;nid, 'field_1' =&gt; $node-&gt;field_1, 'field_2' =&gt; $node-&gt;field_2,))
      -&gt;execute();
  }
}
You need implement hook_node_prepare. This hook is used to load additional data before a node object is shown on the add/edit form.