How can I add the attribute enctype="multipart/form-data"
to the <form>
tag in the configuration page for a module? That attribute is needed to upload a file to the server.
I am trying to upload a spreadsheet to the server so it can be parsed and have the records inserted into the database. This must be done from the admin section of the module.
I think adding that attribute would be the easiest way to send a chosen file to the server for processing. If there is a better suggestion, please let me know.
Here is the <config>
section of my mod_<x>.xml
file:
<config>
<fields name="params">
<fieldset name="basic">
<field name="fileUpload" type="file" default="" label="Data File" accept=".csv"
description="File containing records to upload to database."/>
</fieldset>
</fields>
</config>