POP UP with Contact form 7 issue

Hi,

I'm using the Pop up plugin with a contact form 7 form. When users click the "submit" button, the pop-up would close and page would refresh, and then after a while the same pop up would appear with the "thank you for submitting your form" message.

Is there a way to keep the pop-up window open when a user submits the form or has an error when filling out the form?

I noticed this is a known issue and tried the solution from a support forum to use the following script in the footer. It worked on Chrome but not on Safari... Please advise...

I also followed the instruction to grand support access.

Thank you!
Yan

<script>
jQuery(document).on( 'popup-submit-done', function(event, popup, data){
// Option A: Do not ever close Popup 18 automatically!
if ( data.popup_id == 18 ) {
data.close_popup = false;
}

// Option B: Do not close Popup if there is an Ajax JSON response that contains "mailSent: false"
if ( undefined !== data.last_ajax.responseJSON ) {
response = data.last_ajax.responseJSON;
if ( false === response.mailSent ) {
data.close_popup = false;
}
}
});
</script>

  • Lindeni Mahlalela
    • Recruit

    Hello Yan,

    I hope you are doing great today and I am sorry that you are having issues using our plugin. You are right, this is a known issue a fix is available but not yet planned to be included in the next release.

    You can download the plugin attached to this thread and install it to your website replacing the current one: https://premium.wpmudev.org/forums/topic/pop-up-pro-contact-form-7-problem. This is a modified copy of the latest version of PopUp Pro so you should not have an issue using it.

    You can manually apply the fix as described in the linked post.

    I hope this helps resolve the issue but please let us know if you are having issues regarding this and we will be happy to help.

    Cheers,
    Mahlamusa

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.