# New GravityForms Doesn't Support Button Animation

**URL:** <https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749>\
**Category:** Get Help\
**Tags:** custom\
**Created:** [June 9, 2021, 4:33am UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749 "2021-06-09T04:33:13Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5b199982d16560.5](https://avatars.discourse-cdn.com/v4/letter/u/e95f7d/32.png) [@user5b199982d16560.5](https://community.gravityforms.com/u/user5b199982d16560.5)\
**Post date:** [June 9, 2021, 4:33am UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/1 "2021-06-09T04:33:13Z")

</div>

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.

```auto
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?

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [June 9, 2021, 2:39pm UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/2 "2021-06-09T14:39:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![joelcomit](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/joelcomit/32/2944_2.png) [@joelcomit](https://community.gravityforms.com/u/joelcomit)\
**Post date:** [June 15, 2021, 3:29pm UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/3 "2021-06-15T15:29:13Z")

</div>

Can what this user is trying to accomplish become core functionality? Even disabling the button on click and showing the spinner inside the button would be really helpful to prevent duplicate submissions and provide feedback to the user.

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [June 15, 2021, 3:40pm UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/4 "2021-06-15T15:40:54Z")

</div>

Hi @joelcomit - it’s not possible with default functionality at this time, and a JavaScript or jQuery solution is the only way I know of to accomplish this currently.

---

<div class="post-metadata">

**Author:** ![user5b199982d16560.5](https://avatars.discourse-cdn.com/v4/letter/u/e95f7d/32.png) [@user5b199982d16560.5](https://community.gravityforms.com/u/user5b199982d16560.5)\
**Post date:** [June 15, 2021, 7:15pm UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/5 "2021-06-15T19:15:54Z")

</div>

Are you able to point me to documentation on how it has changed? I searched the changelog and there was no mention of changes to how the submit button is treated.

---

<div class="post-metadata">

**Author:** ![aintbad](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@aintbad](https://community.gravityforms.com/u/aintbad)\
**Post date:** [June 17, 2021, 11:28am UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/6 "2021-06-17T11:28:16Z")

</div>

Hey Chris,

This thread, the user also supplies some javascript that no longer works and freezes the form.

How can we disable the submit button after the user has clicked “submit”?

This would be a great feature in gravity forms to have.

> [@Disable Submit button after submit](https://community.gravityforms.com/t/disable-submit-button-after-submit/4289/7):
>
> We’re experiencing the same. When having an AJAX form, and the user double-clicks on the submit button, you get duplicate entries. Former mentioned solutions like [Disabling the Submit button to prevent multiple entries « Gravity Support Forums](https://legacy.forums.gravityhelp.com/topic/disabling-the-submit-button-to-prevent-multiple-entries) doesn’t seem to work in 2.5 (anymore?). When hiding/disabling the submit button after clicking on it, stops the complete proces of submitting.

Taylor

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [June 17, 2021, 8:12pm UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/7 "2021-06-17T20:12:32Z")

</div>

Hi Taylor. I don’t have a method for that at this time. If you would like to suggest that for inclusion in a future release, I recommend adding that to our product roadmap. Click the blue ➕ in the lower left on this page to add a note for our product team:

[https://www.gravityforms.com/gravity-forms-roadmap/](https://www.gravityforms.com/gravity-forms-roadmap/)

Thank you.

---

<div class="post-metadata">

**Author:** ![user5fbe685e24e09673](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/user5fbe685e24e09673/32/2771_2.png) [@user5fbe685e24e09673](https://community.gravityforms.com/u/user5fbe685e24e09673)\
**Post date:** [June 19, 2021, 2:54pm UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/8 "2021-06-19T14:54:38Z")

</div>

Suggested. I didn’t know I needed this but realised i do. Just building a 80 field 3 page monster of a form with UR and APC and I’m sure I will need this.

---

<div class="post-metadata">

**Author:** ![aintbad](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@aintbad](https://community.gravityforms.com/u/aintbad)\
**Post date:** [June 19, 2021, 3:04pm UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/9 "2021-06-19T15:04:47Z")

</div>

It isn’t animation but it does say “Processing, please wait…”

```auto
<script type="text/javascript">
	jQuery(document).ready(function($){
		//NOTE: replace 64 below with your actual form ID
		$('#gform_submit_button_64').on('click', function(event){
			$(this).prop('value', 'Processing, please wait...');
		});
	});
</script>

```

---

<div class="post-metadata">

**Author:** ![user5b199982d16560.5](https://avatars.discourse-cdn.com/v4/letter/u/e95f7d/32.png) [@user5b199982d16560.5](https://community.gravityforms.com/u/user5b199982d16560.5)\
**Post date:** [June 23, 2021, 7:59pm UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/10 "2021-06-23T19:59:04Z")

</div>

That’s an ok solution but then what happens if the form doesn’t submit and discovers errors or missing required fields. Is there a way to have some kind of callback so that we can reset the button to “Submit”?

---

<div class="post-metadata">

**Author:** ![user5be7b0c7e65234.7](https://avatars.discourse-cdn.com/v4/letter/u/6f9a4e/32.png) [@user5be7b0c7e65234.7](https://community.gravityforms.com/u/user5be7b0c7e65234.7)\
**Post date:** [October 19, 2021, 12:49am UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/11 "2021-10-19T00:49:51Z")

</div>

We also need this and are really shocked that scripts that worked in versions prior to 2.5 stopped working as soon as we upgraded and actually broke the submission process. Both of the below scripts used to work prior to GF 2.5 BUT now don’t allow the form to actually be submitted when the button is clicked. Is there any way to have the Submit button say “Processing…” after the button is clicked and reverts back to “Submit” if the validation did not allow the entry to be submitted?

Two scripts that used to work in versions prior to GF 2.5:  
1.  
jQuery(function($){  
$(".gform\_wrapper form").on(“submit”, function(e){  
b = $(“input[type=submit]”, this);  
b.attr(“disabled”, true);  
b.css(“background”, “darkgray”);  
b.css(“color”, “black”);  
b.val(“Processing…”);  
});  
});

1. 

jQuery( document ).ready( function ( $ ) {  
$( ‘input[type=“submit”]’ ).on( ‘click’, function () {  
$( this ).prop( ‘disabled’, true ).val( ‘Processing…’ );  
$( this ).parents( ‘form’ ).submit();  
} )  
} );

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [October 19, 2021, 8:42pm UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/12 "2021-10-19T20:42:16Z")

</div>

Hi Mikhail. Samuel replied here:

> [@A way to show form is submitting or stop double click submissions (2.5+) \[RESOLVED\]](https://community.gravityforms.com/t/a-way-to-show-form-is-submitting-or-stop-double-click-submissions-2-5/10970):
>
> Continuing the discussion from [A way to show form is submitting or stop double click submissions](https://community.gravityforms.com/t/a-way-to-show-form-is-submitting-or-stop-double-click-submissions/8754/3): Hi Chris, does this script/function no longer work with GF 2.5? I have the exact code you provided enabled, and when I click submit, it does change the button text to say “Processing…” but it never actually submits the form. It’s as if clicking the button only changes the button name but then does not allow the submit button to actually submit the entry. Any thoughts on what is going on? Is this ha…

I am going to close this topic rather than continue it, because it is so old. Feel free to open a new topic if you need to. Thank you.

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [October 19, 2021, 8:42pm UTC](https://community.gravityforms.com/t/new-gravityforms-doesnt-support-button-animation/9749/13 "2021-10-19T20:42:19Z")

</div>


