PopUp Pro Upgrade - Broke Contact 7 Form Send

Before Upgrade PopUp Pro worked with Contact Form 7 when I changed PopUp Setting to Page Footer and changed the following code under /wp-content/plugins/contact-form-7.php
change this: define( 'WPCF7_LOAD_JS' , true);
to this: define( 'WPCF7_LOAD_JS' , false);
The popup would remain open and say sent successfully or if an email address was typed incorrectly it would remain open and allow the user to correct the problem and resend. Then the user could close the box by clicking on the X button.
Today after popup pro upgrade to the box automatically closes out when submit button is used. There is no confirmation that it was sent successfully. and if there was a syntax error with email it would not show that and it is not sending to our email.

  • Vaughan
    • Support/SLS MockingJay

    Hi Kristin,

    Hope you're well?

    Could you try changing the loading method to wordpress AJAX and see if that helps, as some improvements were made in that area.

    However if that fails, could you try rolling back to the previous version & see if it begins to work again?

    To rollback, visit the project page here. https://premium.wpmudev.org/project/the-pop-over-plugin/

    click changelog in the right colum under the popup image.

    Then click the version number which should then download that version to your desktop as a zip file.

    Using FTP, navigate to /wp-content/plugins

    Then delete the current popup folder.

    Now unzip the zip to your desktop

    Upload the popup folder to the wp-content/plugins folder.

    Hopefully that should now get you working again.

    Let us know if this still works for you. Just need to test in case something else may have affected it.


  • Vaughan
    • Support/SLS MockingJay

    Hi Kristin,

    Thanks for letting me know, the previous version still works.

    At least that tells us for sure that something in the latest version definitely affects this, I have flagged one of our developers to help with this to see if we can determine the cause for you.

    Hope this helps

  • Hoang Ngo
    • Code Slayer

    Hi @Kristin,

    I hope you are well today.

    I'm going to flag the developer here, after looking in to the code, it's look like the issue come from the javascript function called "form_submit", It's look like the plugin can handler well with normal form submission, but if the ajax form inside Popup, look like we have a conflict here or something like that. The lead developer get noticed about this issue, and he will response back soon :slight_smile:

    I'm sorry for this inconvenience and many thanks for your patience.

    Best regards,
    Hoang Ngo

  • Philipp Stracker
    • The Crimson Coder

    Hi Kristin,

    thanks for letting us know about this scenario!
    In the past there were complaints about PopUps that stayed open after submitting form data, or even showing the loading animation indeinitely. This is why we decided to add a condition that closes the PopUp if the form-state is unknown.

    This means that forms that submit data via Ajax or to external webpages cannot be tracked by our PopUp plugin due to obvious security restrictions. Since we do not know the form-state we will now assume "everything okay, close the popup" by default.

    I hope you understand the reason and current logic...

    Now to the solution:
    Right before the PopUp is closed there is a javascript hook that allows you to override our new logic and keep the PopUp open!

    All you need it to insert short javascript to your site - either by adding it to footer.php or by using a plugin such as Global Javascript

    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;

    Let us know in case you need further help to set up the handler for your site or if you have any other questions. We're happy to help :slight_smile:

    Thanks, Philipp

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.