How to get values from $form_state with webform I'm using webform for submission and trying to simulate
GET parameters (though by default it uses POST).

Here's my code implementing hook_form_alter():

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $nid = 2;
  if ($form_id == 'webform_client_form_' . $nid) {
    $option['query'] = array(
        'name' =&gt; $form_state['values']['name'], 
        'email' =&gt; $form_state['values']['email'], 
        'gender' =&gt; $form_state['values']['gender'], 
        'birthday' =&gt; $form_state['values']['birthday'], 
        );
    $form['#action'] = url('path/to/myViewsPage', $option);
  }


Above code should take me to

'path/to/myViewsPage?name=tom&amp;email=tom@gmail.com&amp;gender=male&amp;birthday=12/21/2013'


But I got following error:


  Undefined index: values in mymodule_form_alter()


Could someone tell me where to define the $form_state['values']? Isn't it predefined by Webform?
It's a bit hackish, but I think it would it be better if you set the path to your View in $form['#action'] and post the form directly to your View. Then on your Views page you grab the posted values from the form, in a contextual filter if you need that. In that way you also completely bypass the submission handling and nothing is saved.