civix generate:form
creates a basic form with a buildQuickForm()
and postProcess()
demonstrating a select option.
I want the form to upload a file and save it to a custom field.
If I add: $this->add('file', 'file_id', "My document")
then I get a normal file upload element on the form, but the problem is what to do with it in the postProcess.
$this->controller->exportValues()
does not include my file_id
although it is listed in $this->getSubmitValues(TRUE)
with the the original file name and tmp_name.
I understand QuickForm does some filtering of submitted values but how do I stop the file details being filtered out and get it saved as a custom field?