Forums

don't send form when uploading a file larger than the maximum size

Tumbleweed 13 May, 2020
Hello,
I have a form with a file field, I have limited the size at 3 Mo, but when I try to upload a file larger than 3 Mo, I have an message error, it is normal, but the form is still send.
I don't know how to prevent the form from being sent in the case of files larger than 3 MB.
Best regards
Patrick
GreyHead 14 May, 2020
Hi Patrick,

You can use a ReDirect or ShowStopper action in the On Fail event of the Upload Files action.

Bob
Tumbleweed 14 May, 2020
Hello,
Thank you for your quick answer,

With Stopper (I don't find ShowStopper but it is perhaps the same thing) it's work but I have only the display of the error message and the form is not displaying.

So, I try with Event Loader on fail event like for security image, and it's better for me, I have the error message and the form is displaying.

Is it a good idea ?

Regards
Patrick
healyhatman 14 May, 2020
"Stop" action means what it says - it STOPS. You want an EVENT LOAD, like you said.
Max_admin 19 May, 2020
The form should show an error when the file size exceeds the limit, what is your file size and what did you use in the file field settings ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.