Cannot get value of form field of type 'file' in drupal form I have a form field  such as  , 

   $form['fileTransfer_settings']['file_path'] = array(
    '#type' =&gt; 'file',
    '#title' =&gt; t('Choose file'),
    '#size' =&gt; 22,
    '#description'   =&gt; t('path for the csv file'), 

  );


Now I am looking to save the path of the uploaded file in the submit handler , 

But when I look into the value of the form field in the submit handler I get null, 

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

     dpm($form_state[values]); //other fields show value 
     dpm($form_state['values']['fileTransfer_settings']['file_path']); //null
 }


What  am I doing wrong here?
Submitted values are flattened unless the form element contains the #tree property.

So either use:

$form_state['values']['file_path'];


Or change the wrapper:

$form['fileTransfer_settings'] = array(
  '#tree' =&gt; TRUE,
  ...
);


And use your current submission code.