Form HELP
Permalink
Good Afternoon guys,
so I have a document upload form all functional on my site,the default not an add on, can i direct where the file that is uploaded goes?
Can i direct into a different folder, if I can this it would make a nightmare project end!
so I have a document upload form all functional on my site,the default not an add on, can i direct where the file that is uploaded goes?
Can i direct into a different folder, if I can this it would make a nightmare project end!
If on the other hand you would like the files uploaded to a physical location on your web server, you will need to modify the form controller. Keep in mind, that by using this method, you will no longer be able to access the file with the concrete5 file manager. In addition, this file handling will be applicable to all "Form" blocks you add to your website.
Step 1. Create the following directory
blocks/form
Step 2. download the attached controller.txt file and rename controller.php
Step 3. Upload the "controller.php" file into that directory.
Step 4. Edit the controller.php file at line 12:
Enter the directory you would like the uploaded files to go into.
Step 5. Make sure the directory you specified exists.
That is it. Any files uploaded with the form block will now be routed to the specified directory.
As with all things file system, I can make no guarantee that this will work with your web host. A lot of times certain configurations require different relative or fixed directories to be used when moving files on the server.
If the file is unable to be moved, the form will show an error indicating that the upload failed.
-Guy