I have created a block through custom module and added file field in block configuration form using below code.
function mymodule_block_configure($delta){
if($delta=='mymodule'){
$form = array();
$form['mymodule_file']=array(
'#type'=>'file',
'#title'=>'Upload text file',
'#name'=>'files[sample]',
);
return $form;
}
}
When I try to check this field in hook_block_save, the form element is empty even when the form is submitted after browsing the file.
function mumodule_block_save($delta,$edit=array()){
if($delta=='mymodule_block'){
dpm($edit);
}
}
$edit['mymodule_file']
is empty after the form is submitted.
Am I missing anything?