I am using gravity form to submit my lead to a third party the problem is when I click on submit it takes 5 seconds to get a reply and post the lead, while that is happening I want to show a loading or searching animation to the user.
I am using gravity form and I have no Idea where and how to add this function.
Can somebody please help me to get this resolved, I am not using ajax.
The most recent update should have a default loading image, when you have AJAX as true in the PHP shortcode.
When AJAX attribute is true like here
Do this…
To keep from getting duplicate lead submission when the submit button is clicked. Keep in mind that the Gravity Form will handle the validation. This will style the button, change the text inside of it and disable the buttons click. The loading image will show by default via Gravity Forms.
In jquery try this to override the image src when it’s visible, inside of the “submitContactForm” function.
So that you won’t have to remember to override that image anytime that you update the Gravity Form plugin.