Building a small file handling system

fribse 11 Apr, 2016
Hi Guys

I'm trying to build a very small file handling system in Chronoforms as none of the downloadable components does what I need.

So far I've been able to write a form that accepts a series of fields, and one file, and send an email with the fields and the filename.
Problems I've run into so far:

1) If I set it to only accept one file, I works. I end the form with a message saying 'thankyou' and then it sends an email to us. I would like to loop it back, so the form starts over, but if I just add an event loop, the form is not cleared. How do I get it to clear?

2) How do I make it handle multiple files? I've ticked the 'Multiple Files' in the File Upload, it then says in the text that Field Name should end with "[]", so I added that to the Field Name, it now reads file_upload[], and I did the same in the File Upload action. But it doesn't work, no files are uploaded, and the email it should send is not sent.

3) The accept feature is great, but an explanation of how to specify multiple file types would be a big help, it took some tries to find the right one ','.

4) I would like to build a corresponding page for download, where all the uploaded files are shown, and can be selected for download and deletion, but for this I guess I need to store the fields in a database. How do I do that?
GreyHead 12 Apr, 2016
Hi fribse,

1. You can use a Custom Code action to unset any unwanted data. But this might also be autoload from the browser.

2. In the Files Upload action leave the [] out and add the name to the Arrays box as well.

3. What is the Accept feature?

4. You store the data in the same way as any other form data. I believe there is a FAQ with more info on this. I would only save the file name and folder.

Bob
fribse 18 Apr, 2016
Hmm, ran into some big problems with the size of the uploaded files, so I gave up on the project. We've bought a small component that does ajax uploading, and works much like we want it.
fribse 18 Apr, 2016
Btw. The Accept feature was about which files the filerequester accepts
This topic is locked and no more replies can be posted.