Custom form values in hook_form_alter() not available in custom validate function I'm modyfing a node form to add a few extra fields. On submit, I need to program some extra logic to these values then save them to the node object.
function module_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if($form_id == 'my_node_form') {
    $form['custom_form'] = array(
     '#type' =&gt; 'textfield',
     '#title' =&gt; t('Custom field'),
     '#default_value' =&gt; 'enter custom text here',
    );

    $form['#validate'][] = 'custom_form_process_values';  
  }
 }


 function custom_form_process_values(&amp;$form, &amp;$form_state, $form_id) {
    echo '&lt;pre&gt;' . print_r($form_id,1) . '&lt;/pre&gt;';
    echo '&lt;pre&gt;' . print_r($form_state,1) . '&lt;/pre&gt;';
    exit();
  }

When I go to node/22/edit and change &quot;enter custom text here&quot; to something else, and I submit the form, I only ever see &quot;enter custom text here&quot; and not the new text I entered. It seems that it does not carry the text through to the validate function. Also tried it in a submit function but the same problem occurs.
Why does this happen?
This pair of functions should do the trick:

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if (stripos($form_id, 'node_form') !== FALSE) {
    $form['custom_form'] = array(
     '#type' =&gt; 'textfield',
     '#title' =&gt; t('Custom field'),
     '#default_value' =&gt; 'enter custom text here',
    );
    $form['#validate'][] = 'mymodule_custom_form_process_values';
  }
 }

function mymodule_custom_form_process_values($form, &amp;$form_state) {
  // Check to see if the default text has been altered by the user.
  if ($form_state['values']['custom_form'] != $form['custom_form']['#default_value']) {
    // Do something here...
  }
}


Tested on Drupal 7.53.