Gravity Forms | Disable submit button when file upload exceeds size

57 Views Asked by At

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

I tried different ways with JavaScript and jQuery, for example, 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: https://www.taxivacatures.nl/vacatures/chauffeur-leerlingenvervoer/

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.

Cheers, Nathan

One of many codes I tried:

if($('.gfield_description:contains("\[limiet\]")').length) { $(".gform_button").addClass("disabled"); }

0

There are 0 best solutions below