# Display Spinner when submitting a non-ajax form

**URL:** <https://community.gravityforms.com/t/display-spinner-when-submitting-a-non-ajax-form/13301>\
**Category:** Get Help\
**Tags:** please-wait, progress-indicator, has-ticket\
**Created:** [August 24, 2022, 10:34am UTC](https://community.gravityforms.com/t/display-spinner-when-submitting-a-non-ajax-form/13301 "2022-08-24T10:34:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Will](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/will/32/5730_2.png) [@Will](https://community.gravityforms.com/u/Will)\
**Post date:** [August 24, 2022, 10:34am UTC](https://community.gravityforms.com/t/display-spinner-when-submitting-a-non-ajax-form/13301/1 "2022-08-24T10:34:16Z")

</div>

is there a way to show a spinner when a form has been submitted built into gravity? or a sensible way to do it? I have a form that takes a little white to submit. It is not an ajax form.

Thanks

Will

---

<div class="post-metadata">

**Author:** ![sacom](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/sacom/32/53_2.png) [@sacom](https://community.gravityforms.com/u/sacom)\
**Post date:** [August 24, 2022, 11:44am UTC](https://community.gravityforms.com/t/display-spinner-when-submitting-a-non-ajax-form/13301/2 "2022-08-24T11:44:06Z")

</div>

Doing so is not a feature of Gravity Forms. I’m not aware of any ready to use third-party add-on for it either. So you would need to add your own custom code to the form to implement it.

If you feel you need assistance implementing this, we would recommend contacting a freelance developer.  
**Gravity Forms are**  **official partners with** [**Codeable**](https://codeable.io/?ref=BeT91), who are the #1 WordPress outsourcing service. They can provide quality development from hand-picked Gravity Forms specialists for any project size and budget. Additionally, they can also provide you with a no obligation estimate of what the project may cost up front. You can reach them via [this link.](https://codeable.io/?ref=BeT91)

You can also post to our [Community Forum Job Board](https://community.gravityforms.com/c/job-board), We do not vet any of the individual developers there, it is an open forum for all, but our community is certainly full of talented folks!

We hope this helps get you to where you need to go!

---

<div class="post-metadata">

**Author:** ![Will](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/will/32/5730_2.png) [@Will](https://community.gravityforms.com/u/Will)\
**Post date:** [August 24, 2022, 3:18pm UTC](https://community.gravityforms.com/t/display-spinner-when-submitting-a-non-ajax-form/13301/3 "2022-08-24T15:18:03Z")

</div>

Is there any issue with catching the onclick of the submit button? will that hinder gforms?

So something like this:

```auto

add_action( 'gform_enqueue_scripts', 'your_prefix_add_scripts' );
function your_prefix_add_scripts($form) {
	    echo '<script>
			$(document).ready(function(){
				const button= document.querySelector(".gform_button");
				button.addEventListener("click", (e) => {
					 	e.target.value = "Sending";
						e.target.parentElement.classList.add("gform-sending");
						// e.preventDefault();
				});
			});
        </script>';
	}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [September 23, 2022, 3:18pm UTC](https://community.gravityforms.com/t/display-spinner-when-submitting-a-non-ajax-form/13301/4 "2022-09-23T15:18:41Z")

</div>

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