Forums

Can't upload and attach file from submitted form with Chronoforms V5

Jean 03 Nov, 2016
Hi,

Long time fan of ChronoForms but lately I've been having some issues with some functionalities of the latest version. One of the issue is the upload function who doesn't seem to work no matter the settings I'm configuring the forms with. I've read all the FAQs related to the upload functionality (http://www.chronoengine.com/faqs/53-cfv4/cfv4-file-uploads.html) and I've also search for a solution in the different forums. Here's the issue:
I've set up a form with the following elements (shown in order they actually appear on the page):

Designer view
- Text input
- Text input
- Email input
- Select Dropdown
- Text area
- File field
- Captcha
- Submit Button

Setup view
- On load (Event)
-------- Load Captcha
-------- HTML (Render Form)
- On submit
-------- Check Captcha
---------------- On fail
------------------------ Event Loop
-------- Files Upload
-------- Email
-------- Display Message

When testing the form everything is working fine except for the fact that I'm not receiving the file I've inserted with the browse button and no file is being uploaded to the default upload folder (which is set to 755). In one of your post (https://www.chronoengine.com/forums/posts/f3/t102193/file-does-not-upload2.html?hilit=upload) you state that the Ajax functionality doesn't work with the upload functionality so I disable it but when I do so I keep receiving an error from the captcha constantly saying that I've entered the wrong verification code even when the verification code is correct.

I've attached a backup of the form so you can take a look at it. Would you happen to have some form samples with the upload functionality in them that I can download from your site?

Thank you in advance.

P.S: By the way, I'm using PHP 5.6.24.
GreyHead 03 Nov, 2016
Hi Jean,

I restored your backup and it is working correctly, the file is uploaded with no problems.

Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.

Bob
Jean 03 Nov, 2016
Thanks for the quick reply. You're right, everything is working fine. The problem was with the size of the file used to test the upload functionality who was less than 1kb. But the weird thing now is that even though the email and the file is being sent successfully, I keep getting the - You have entered a wrong verification code! - notice after entering the right verification code and the Display message is not being shown at all. I've inserted a Debugger action into the On Submit (completely at the end) as you suggested and there's no error message being displayed. I guess it's because of the Event loop reloading the form... I've tried to move it into the On fail (above the Event Loop) of the Check Captcha Event and upon saving the form, the Debugger action keeps getting moved out of the On fail and is being move right below the Check Captcha event.

Any suggestions?

Thanks.
GreyHead 18 Nov, 2016
Hi Jean,

Sorry I missed this earlier. I don't see any obvious explanation.

It sounds as though the form may not be saving correctly if the Debugger isn't staying put. Have you tried moving it up before the Check Captcha action?

You can get repeated Captcha failures if the site has caching enabled as the Captcha requires a freshly created page to work.

Bob
Jean 04 Dec, 2016
Ok. I'll try that and let you know if it make a difference.

Thanks.
This topic is locked and no more replies can be posted.