$form_state['values'] partial empty, while $form_state['input'] is filled I would like extend an existing (altered) form. For this case, I created a new form with the Form API:

function my_new_form($form, &amp;$form_state) {
  ...
}


In the next step, I get the existing form, which one I would like to extend:

function my_new_form($form, &amp;$form_state) {
  $form = drupal_get_form('my_form');
}


Now, I extended the form with fields like this :

function my_new_form($form, &amp;$form_state) {
  $form = drupal_get_form('my_form');

  $form['foo'] = array(
    '#type' =&gt; 'textfield',
    '#size' =&gt; 30,
    '#title' =&gt; t('foo bar'),
  );

  // and so on..

  return $form;
}


In my Template, I display the form:

print drupal_render(drupal_get_form('my_new_form'));


This works correctly, but after submitting the form, the values from the form from which I extend in the $form_state['values'] are empty. But in $form_state['input'] they are existing.

Do you have any idea what I'm doing wrong?
The reason drupal_get_form() doesn't work in your code is that it contains the following code.

  $form_state = array();

  $args = func_get_args();
  // Remove $form_id from the arguments.
  array_shift($args);
  $form_state['build_info']['args'] = $args;

  return drupal_build_form($form_id, $form_state);


What the function passes to the form builder is a newly created $form_state array, not the one being passed to your form builder.

Using drupal_build_form() is not working because the function is retrieving the form from the cache. (See the comments before the code.)

  // If the incoming input contains a form_build_id, we'll check the cache for a
  // copy of the form in question. If it's there, we don't have to rebuild the
  // form to proceed. In addition, if there is stored form_state data from a
  // previous step, we'll retrieve it so it can be passed on to the form
  // processing code.
  $check_cache = isset($form_state['input']['form_id']) &amp;&amp; $form_state['input']['form_id'] == $form_id &amp;&amp; !empty($form_state['input']['form_build_id']);
  if ($check_cache) {
    $form = form_get_cache($form_state['input']['form_build_id'], $form_state);
  }


You can implement hook_form_alter(), hook_form_FORM_ID_alter(), or hook_form_BASE_FORM_ID_alter() for a form that has been already altered.

About calling drupal_get_form() from a template file, see Be careful with drupal_get_form() in theme layer. As reported in that blog article, you would have problems with the validation error messages which will not appear.