How to set value to auto-complete field after form submission? I have a dependent auto-complete form field in my custom module. After submission the form the auto-complete field shows above the result output. Now I want that submitted value should become default value after form submission. 
I tried like this:

'#default_value' =&gt; isset($form_state['values']['keys']) ? $form_state['values']['keys'] : '',


but not getting any value. I also tried like this:

'#default_value' =&gt; isset($_REQUEST['keys']) ? $_REQUEST['keys'] : '',


but still unable to get any value. someone please help.
Finally I found the solution myself. I simply got a value from URL like this:

'#default_value' =&gt; (arg(3)!= 'none') ? arg(3) : '',