Forums

server side validation and file upload

nilubon03 30 Jun, 2014
Hello,

My form has an upload file and I had auto server side validation on it. The steps after submit, on success, are Check Captcha, Auto Server Side Validation, Upload Files, DB Save, show Thank you message, and send email. The issue is I could not pass the server side validation for the file upload. It always display "This field should NOT be empty.".
So I change the order after submit to Check Captcha, Upload Files, Auto Server Side Validation, DB Save, show Thank you message, and send email. This time, no server validation, no error, no data in database, but saw Thank you message and received email.
Did I miss something on the order or the setting?

Thank you,
Nilubon
nilubon03 01 Jul, 2014
Thank you, I checked on FAQ under validation section, but it did not help me to fix my issue.

Nilubon
Max_admin 01 Jul, 2014
The server validation should be after the upload, if you want to check the file is not empty, if this doesn't work for you then please post a screenshot for the events section in your form!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
nilubon03 02 Jul, 2014
Thank you Max,

Attached is the setting that did not work. This is a behavior of this setting with JavaScript turned off. When I click submit without enter anything, it asked me to enter the reCaptcha code. When I entered only verification code and click submit, it sent to Thank you message and I received email notification. There is no server validation at all and no DB Save.

Please advise.

Thank you,

Nilubon
Max_admin 02 Jul, 2014
Answer
Maybe the file is not uploaded at all ? you run the validation when the upload works (file has been uploaded on server), so if there is no file then there is no success event, and no validation will run!

please move the validation AFTER the file upload!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
nilubon03 03 Jul, 2014
Thanks Max for the tips, it worked. I learned new thing today. Attached is a new order on the action tab to make auto server side validation works with the upload file.

Nilubon
GreyHead 04 Jul, 2014
Hi Nilubon,

In general I suggest that you avoid using the On Success events wherever possible. It complicates your form and makes debugging more difficult. Keep the main events one after the other in the main On Submit event.

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