简体   繁体   中英

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 does not seem to work eg:

<script>console.log("successful-form-transmition");</script>

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
});

See documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM