Disable submit button when file upload exceeds size


When a file exceeds the upload limit an error message appears, but you can still click the submit button, because it’s not necessary to upload a file.

I tried different ways with JavaScript and jQuery f.e. to add a class to the submit button when the error message appears, so I can disable pointer events and grey out the button, but nothing is working for me.

Does someone know a solution?

One of the forms: Chauffeur Leerlingenvervoer | Taxivacatures

Sadly enough there is no class added when the error message appears. There’s already an error message div without text and gets filled with text after the upload size exceeded. Which is a pretty silly solution.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.