title: Drupal Form Alter hook
body: <p>I am using mymodule_form_alter hook </p>
  
  <p>I want to change  values of fields of form after submit.</p>
  
  <p>Anybody have an idea how to do this. I am using drupal7.</p>
  
  <p><strong>Here is the code</strong> </p>
  
  <pre><code>function check_domain_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    switch ($form_id) {
      case "user_register_form":
        $form['#submit'][] = 'check_domain_user_register_form_submit';
        break;
    }
  }
  
  function check_domain_user_register_form_submit($form, &amp;$form_state) {
    $form_state['input']['profile_main']['field_firm_company_name']['und'][0]['value']='test';
  }
  </code></pre>