Drupal 7 pass a custom form fileds input as arguments to the url on submit How can I pass fields input as arguments to the url on custom form submit? I tried the following:

function custom_form_form($form, &amp;$form_state) {

  $form['location'] = array(
    '#type' =&gt; 'radios',
    '#title' =&gt; t('Location'),
    '#options' =&gt; location_options(),
    '#default_value' =&gt; '',
    '#required' =&gt; TRUE,
  );

  $form['#submit'][] = 'custom_form_submit';
  return $form;
}

function location_options() {
  return array(
    'to' =&gt; 'To USA',
    'within' =&gt; 'Within USA',
  );
}

function custom_form_submit($form, &amp;$form_state) {
  // I need a function here to redirect to a url with something like
  // move-quote?location=to
  // I tried $form_state['redirect'] but didn't work
}
$form_state['redirect'] = array(
  'move-quote',
    array(
     'query' =&gt; array(
       'move-quote' =&gt; $form_state['values']['location'],
     ),
    'fragment' =&gt; 'optional',
  ),
);


should work in your submit function. Try also

$form['#submit'][0] = 'custom_form_submit';


and clear your caches.
Also http://drupal.org/node/291680 was helpful