How to pass a form field value from THEME_system_theme_settings_alter() to THEME_form_system_theme_settings_submit() MYTHEME/theme-settings.php: THEME_form_system_theme_settings_alter() builds an input form for /admin/appearance/THEME and the input (values) of the user will not be known by Drupal nor by theme_get_settings() before saving the user given input.

I'm kind of curious how to pass this value to THEME_form_system_theme_settings_submit() in theme-settings.php? 

In other words: I need the value from the user input of the theme settings form BEFORE we leave theme-settings.php - Is that possible? Or do I need another way around this?

Test: Let's say the value gets stored in a 'textfield', build by the THEME_form_system_theme_settings_alter() function:

// theme-settings.php
function THEME_form_system_theme_settings_alter(&amp;$form, &amp;$form_state) {
// Test form      
$form['whatever_fieldset_group']['user_input'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Test to get value'),
    '#default_value' =&gt; theme_get_setting('user_input'),
    '#description' =&gt; t('
         Type some text in textfield 
         to get shown in submit message'),
);
}


To test if I can pass that value to THEME_form_system_theme_settings_submit() we try to show the value of this field in a submit message:

// theme-settings.php
function THEME_form_system_theme_settings_submit($form, &amp;$form_state) {

    // the following will not work inside theme-settings.php
    // because value is not known yet by theme_get_setting()
    $data = theme_get_setting('user_input');

    drupal_set_message(
          'For testing purposes we submit that you have 
           filled the textfield with the following 
           mindless value: '.$data
          );
}


This will not work. Of course. And variable_get() and variabel_set() seems to be no option ether, because we can not fill any variable without knowing the value in theme-settings.php.

The reason for asking this is, I want to write css from user input in a css file while saving theme settings. Maybe there is a way to fire a function after theme-settings got saved? Not sure. Maybe I need more examples of custom themes and how they solved it there without an additional module ...
The answer to the question is quite simple, but not easy to find in the d.o. docs. Thanks to Clive and Jack-PL who gave me the right direction. To reuse the example from the start question we need to summarize:

A form field input value needs to get splitt off (intercepted) from its usual way getting stored for a short moment. Why? For us to do our own processing while submission before theme-settings.php Party is over. Our form field:

// theme-settings.php
function THEME_form_system_theme_settings_alter(&amp;$form, &amp;$form_state) {
// Test form      
$form['whatever_fieldset_group']['user_input'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Test to get value'),
    '#default_value' =&gt; theme_get_setting('user_input'),
    '#description' =&gt; t('
         Type some text in textfield 
         to get shown in submit message'),
);
}


Now the value will get stored when the user hits submit button. But what if we need to get in between before?

Injecting ...

drupal_set_message('&lt;pre&gt;' . print_r($form_state['input'],1));


... in function THEME_form_system_theme_settings_submit for a moment has revealed, that we were looking for $form_state['input']['user_input'], were our fruits are hanging. Searching the value with drupal_set_message('&lt;pre&gt;' . print_r($form_state['input'],1)); gives us orientation to be able to intercept the right value for our own value processing, demonstrated here in a simple representational form with another little drupal_set_message() scenario:

// theme-settings.php
function THEME_form_system_theme_settings_submit($form, &amp;$form_state) {

    // the following will not work inside theme-settings.php
    // because value is not known yet by theme_get_setting()
    // $data = theme_get_setting('user_input');

    // But this works!
    $data = $form_state['input']['user_input'];

    drupal_set_message(
          'For testing purposes we submit that you have 
           filled the textfield with the following 
           mindless value: '. $data
          );
}


In my case, I was able to save user input into a file now with file_unmanaged_save_data($form_state['input']['user_input'],$filepath); while the user hits submit.

Thanks to Clive and Jack-PL for the fast reply. It helped me a lot!