Hello udidol,
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.
Can you try this code:
<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>
it should keep Popup open after submitting. 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 https://wordpress.org/plugins/global-javascript/
Let me know if this helps.
kind regards,
Kasia
Thread Starter
udidol
(@udidol)
Hi Kasia,
I copied and pasted the code you provided in my theme’s footer, and nothing changed :(.
Just to clarify: When the form is submitted, it doesn’t only close the popup – it refreshes the page. The form then shows up again in the refreshed page with the “form sent” message.
I don’t know if this matters, but after the refresh, the url in the address bar has this added to the end of it: #wpcf7-f2864-o1.
Btw, The plugin is set to Load PopUp using “Page Footer”.
What else could be causing this?/what else can be done to fix it?
Thanks
Thread Starter
udidol
(@udidol)
http://contactform7.com/why-isnt-my-ajax-contact-form-working-correctly/
According to this CF7 documentation, it is likely there is a Javascript conflict between the WPMU Popup plugin and the Contact form 7 plugin, at least in my site.
Here’s a link to the page (popup appears after 6 seconds): http://www.modulo.co.il/product/mapcamel-restfull-gateway/
Please let me know if there’s a fix you can think of!
I’m having the same problem when using contact form 7. When the form is submitted the page popup goes away then comes right back. Can anyone find a fix to this problem!
Here is my page:
http://informationprotected.com/webinar-recording-hr-document-strategy-test/
Hello udidol and pmzpaparazzi,
I’ve contacted our developer about that code and it should work, but it clearly does not. I have to troubleshot that more and speak again with developer about that issue. I’m sorry to keep you waiting – as soon as I will know more I will respond.
kind regards,
Kasia
I am also experiencing the same problem and would be interested in a fix.
thanks,
John
Hello,
I’m afraid I still don’t have answer form developer – I will bug him again to solve this issue.
kind regards,
Kasia