The user above is correct, you would have to enable AJAX on the form and use the gform_confirmation_loaded javascript hook to accomplish what you want to do and execute the correct javascript necessary to close the modal window. I can't tell you what the correct javascript is going to be in order to do what you want to do because I am not familiar enough with the lightbox script to know how it is supposed to be done.
I noticed in your forum post that the code you included had ajax set to false in the shortcode. You need to have ajax set to true. The gform_confirmation_loaded hook is an AJAX only javascript hook.
When enabling AJAX you are going to have to remove the reCAPTCHA field from your form. reCAPTCHA is not compatible with AJAX forms and therefore if a reCAPTCHA field is present, the form does not load using AJAX.
You need to remove the reCAPTCHA field from the form and then make sure that you have AJAX enabled on the shortcode. Then use the gform_confirmation_loaded javascript hook to execute whatever javascript you need to execute to accomplish what you want to do.
Keep in mind that this is a customization and is not officially supported. The techniques and suggestions in that forum post as well as other forum posts that are discussing modal window and lightboxes are entirely user driven customizations. They aren't features or functionality of Gravity Forms itself so they are considered customizations.
Posted 12 years ago on Tuesday February 14, 2012 |
Permalink