Appending a hidden input value to a textarea value? So basically what I need to do is append a hidden input value to the text-area without overriding the original texarea value on submit. What am I doing wrong? This is in the template.tpl file.

function hook_form_alter(&amp;$form, &amp;$form_state, $form_id) {
     if($form_id){
         $sCampaign = $form['submitted']['campaignstring']['#value'];//hidden value
         $sComments = $form['submitted']['Comments']['#value'];//comments textarea
         $sComments = $sCampaign."-".$sComments; // Appending them.

    }

}


I also tried:

function hook_form_alter(&amp;$form, &amp;$form_state, $form_id) {
         if($form_id){
             $form['#submit'][] = 'submit_string';
           }
    }

function submit_string($form, &amp;$form_state){    
    $sCampaign = $form['submitted']['campaignstring']['#value'];
    $sComments = $form['submitted']['Comments']['#value'];
    $sComments = $sCampaign."-".$sComments;

}


Newer try:

function THEME_form_alter(&amp;$form, &amp;$form_state, $form_id) {
//Appending Campaign String to comments
$form['submitted']['Comments']['#value'] = array('#value' =&gt; $form['submitted']['Comments']['#default_value'] .'/'. $form['submitted']['campaignstring']['#value'],
                );
}


function submitHandler($form, &amp;$form_state){
    $campaingString = $form_state['values']['campaignstring'];
    $comments = $form_state['values']['Comments'];
    $comments = $comments."/////".$campaingString;


    drupal_set_message('Submitted');
    drupal_set_message($form_state['values']);
}
Here is a little example (Additional information):

function my_form($form, &amp;$form_state) {
  $form['name'] = array(
    '#title' &gt; 'Name',
    '#type' =&gt; 'textfield'
  );

  $form['sec_name'] = array(
    '#title' &gt; 'last name',
    '#type' =&gt; 'textfield'
  );

  $form['submit'] = array(
    '#value' &gt; 'Run',
    '#type' =&gt; 'submit'
  );

  return $form;
}

function my_form_submit($form, &amp;$form_state) {
  $f_name = $form_state['values']['name'];
  $s_name = $form_state['values']['sec_name'];

  drupal_set_message('Hello ' . $f_name . ' ' . $s_name);
}