gravity forms fire js event on successfull form submission

六眼飞鱼酱① 提交于 2020-01-03 11:32:32

问题


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:


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


来源:https://stackoverflow.com/questions/31565566/gravity-forms-fire-js-event-on-successfull-form-submission

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!