Gravity Forms Fire Js Event on Successfull Form Submission
Is It in Gravity Forms Anyhow Possible to Fire an Javascript Event on an Successful Ajax Form Transmittion? Adding Html Javascript into the Displayed Response...
Is it in gravity forms anyhow possible to fire an javascript event on an successful ajax form transmittion?
Adding html javascript into the displayed response does not seem to work eg:
<script>console.log("successful-form-transmition");</script>
1 Answer
There's an event fired upon successful Gravity Forms submission: gform_confirmation_loaded. You can use it with jQuery like so:
$(document).on("gform_confirmation_loaded", function (e, form_id) {
// code to run upon successful form submission
});