I have a form on a page which is loaded into an iframe (modal) and i'd like to close the modal once the form has been submitted, is there some event fired (in javascript) which i can listen to and close the modal upon successful submission?
Thanks!
I have a form on a page which is loaded into an iframe (modal) and i'd like to close the modal once the form has been submitted, is there some event fired (in javascript) which i can listen to and close the modal upon successful submission?
Thanks!
Hi, obvio,
You could use the "gform_after_submission" (http://www.gravityhelp.com/documentation/page/Gform_after_submission) hook and add some jquery/javascript in it to close your window.
thanks, but finally using that:
$(document).bind('gform_confirmation_loaded', function(event, form_id){
$('#form').delay(3000).fadeOut(600);
});
Glad you got it working and thanks for the example.