In *uploading files* and adding image upload we have a clear explanation on adding upload file in module form hook:
function example_form(&$node, &$param) {
...
$param['options'] = array("enctype" => "multipart/form-data");
...
$output .= form_file(t('Image'), 'image', 50, t('Click "Browse..." to select an image to upload.'), TRUE);
...
return $output;
}
Then $param is used in last lines of node.module node_form:
// Get the node-specific bits.
// We can't use node_invoke() because $param must be passed by reference.
$function = node_get_module_name($edit) .'_form';
$param = array();
if (function_exists($function)) {
$form .= $function($edit, $param);
}
...
$attributes = array('id' => 'node-form');
if (is_array($param['options'])) {
$attributes = array_merge($param['options'], $attributes);
}
return form($output, ($param['method'] ? $param['method'] : 'post'), $param['action'], $attributes);
So, at the end, forms looks like:
<form action="/node/add/example" method="post" enctype="multipart/form-data" id="node-form">
Sounds good?
But what about config block hook?