Why is $form_state always empty, even when my form-building-function is called after validation? I'm having a little trouble with the terminology here, so I'll explain my problem directly with code samples (trucated for clarity).

myModule.module

Here I create a menu with a link to a form built using a function declared in form_identification.php

[...]
require_once(dirname(__FILE__) . '/form_identification.php');
[...]
function myModule_menu() {
    $weight = 1;
    $items = array(
        'identification' =&gt; array(
            'title' =&gt; t('Identification'),
            'page callback' =&gt; 'identification_callback',
            'access arguments' =&gt; array('Acces myModule'),
            'type' =&gt; MENU_NORMAL_ITEM,
            'weight' =&gt; $weight++
        ),
        [...]
    );
    return $items;
}
[...]
function identification_callback() {
  return drupal_get_form("form_identification");
}
[...]


form_identification.php

This file holds the function which builds the form, called form_identification



function form_identification($form_state) {

    error_log("form_state: " . print_r($form_state, true));
    // always outputs `form_state: Array\n(\n)\n`

    $form = array(
        '#attributes' =&gt; array(
            'enctype' =&gt; 'multipart/form-data'
        ),
        'sex' =&gt; array(
            '#type' =&gt; 'textfield',
            '#title' =&gt; t('Sex'),
            '#disabled' =&gt; true
        ),
        /*[...]*/
        'enregistrer' =&gt; array(
            '#type' =&gt; 'submit',
            '#value' =&gt; t('Enregistrer'),
            '#submit' =&gt; array('form_identification_enregistrer')
        )
    );
    return $form;
}

function form_identification_validate($form, &amp;$form_state) {
    /*[...]*/
}

function form_identification_enregistrer($form, &amp;$form_state) {
    /*[...]*/
}


As you can see, I'm printing the contents of $form_state to the log every time form_identification is called, so I can confirm that the function is called on page load and also after validation. The problem is that in both cases, I just get an empty Array (Array\n(\n)\n). I would have expected to get an array full of form info when the function is called after validation. That way, I could have a look at the values entered and decide how to build the form based on them. Is there any way to achieve this? In what situation would $form_state NOT be an empty array?
You've just got the signature for the form function slightly wrong, it should be:

 function form_identification($form, &amp;$form_state) {


The first arg that's passed to your form function by the form builder is the $form, which for a new form is pretty much always an empty array.