New GravityForms Doesn't Support Button Animation

Hi. We have this code that we use to change the button animation. It works in Version 2.4.22 but not in Version 2.5.5.1.

jQuery('.gform_wrapper').on('click', '.gform_button', function() {

          submitContactForm( jQuery(this) );

      });

      function submitContactForm( _this ){

          _this.off('click');
          _this.css('opacity', '0.5');
          _this.val('Sending...');

          _this.attr('disabled', 'disabled');// using this will stop the form from submitting
          jQuery('.gform_wrapper form').submit();// this will make sure that it submits

          //console.log('calibrating...');
      }

Any idea why this doesn’t work anymore?

The way the submit button is treated changed in version 2.5 and later. You will have to update your code to work with the new Gravity Forms version.

© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.