Change focus into another field after updating the default file field and it should take the update.
Referring to the hidden field is the right solution. It will result in code similar to:
'DefaultFileName' => "" .(isset($_POST['HidFieldName'])?$_POST['HidFieldName']:""). "",