I'm trying to organize a number of fields inside of a fieldset and upload fields ('#type' => 'file') don't work. The reason is they get "subclassed" differently in the forms module. Here's my fieldset declaration
$form['submission'] = array(
'#type' => 'fieldset',
'#tree' => TRUE,
);
Now when I put my uploads like this they work fine
$form['thumbnail'] = array(
'#type' => 'file',
'#title' => t('attach your thumbnail here'),
);
$form['design'] = array(
'#type' => 'file',
'#title' => t('attach your submission here'),
);
and the rendered code comes out like this
<div class="form-item">
<label for="edit-thumbnail">attach your thumbnail here: </label>
<input type="file" name="files[thumbnail]" class="form-file" id="edit-thumbnail" size="60" />
</div>
<div class="form-item">
<label for="edit-design">attach your submission here: </label>
<input type="file" name="files[design]" class="form-file" id="edit-design" size="60" />
However, when I subclass them into the fieldset like so
$form['submission']['thumbnail'] = array(
'#type' => 'file',
'#title' => t('attach your thumbnail here'),
);
$form['submission']['design'] = array(
'#type' => 'file',
'#title' => t('attach your submission here'),
);