This error will show if a Contact Form 7 is used in a Slider Modal:
To fix this, insert the custom JS code below into the slider modal
document.addEventListener("sr.slide.afterChange", function (e) {
if (!wpcf7?.init) return;
document.querySelectorAll('form.wpcf7-form').forEach(form => {
if (!form.initialized) { wpcf7.init(form);
form.initialized = true; }
});
});
To locate your current slider API number, open the API tab and click on a method.
Slider Modal with Contact Form 7 Fix
Hi KC!
thanks for your great work and support.
I have the same problem – the Ajax zero- with WP Forms.
How do I fix this?
Hi Jochen,
Thanks for your message. We’ve not tested WP Forms yet and could you please drop us an email at [email protected] so that we could investigate this further on your end?
Thanks!
KC
ThemePunch
I had solved the problem of the number “0” some time ago thanks to this code. Everything worked perfectly until yesterday. Unfortunately, without touching anything to the code, the error started recurring again, I don’t know if due to the latest Slider Revolution update. The JS code was entered correctly but the error still occurs.
Hello,
thanks for contacting us! Your request requires one of our support agents to have a closer look.
In order to give our clients the best support possible, we are having a support ticket system reachable via the link below.
Please use it for your upcoming questions concerning one of our products. This will guarantee the fastest answer possible. Support requests here cannot be answered unfortunately. Thank you!
Please use our ticket systems over at:
https://support.sliderrevolution.com
Cheers Dirk @ Slider Revolution
I solved the problem and I write the solution here, hoping it will be useful to those who have encountered the same error. Version 5.4 of Contact Form 7 evidently has some bugs. I solved it by simply downgrading to the previous version.
Hi Loris,
Thanks for your reply. I’ve updated the code above and please try the solution above and see if it helps. If you require assistance, you can open a ticket here https://support.sliderrevolution.com and we’ll attend to you asap!
Cheers KC @ Slider Revolution
Hello Support,
code works, thank you.
However, the messages for the form are not displayed, for example, if an error was made when filling out the form or the email was sent via the form. What is the reason for this?
Thanks a lot!
Dennis
Hi,
I’m experiencing something similar using WPForms. It works if I add WPForms shortcode directly to a Slider but the moment I add it to a Slider Modal, I get a 0.
Any suggestions on how to resolve this will be gratefully appreciated.
Many thanks 🙏🏾
Hello,
thanks for contacting us! Your request requires one of our support agents to have a closer look.
In order to give our clients the best support possible, we are having a support ticket system reachable via the link below.
Please use it for your upcoming questions concerning one of our products. This will guarantee the fastest answer possible. Support requests here cannot be answered unfortunately. Thank you!
Please use our ticket systems over at:
https://support.sliderrevolution.com or https://support.essential-grid.com
Cheers Dirk @ Slider Revolution
This fixes desktop but when I check on mobile it continues failing the same way.
Any fix?
Hi Jee Ka,
Thanks for your message. Both desktop and mobile should work the same. Please try clearing your browser cache and see if it helps. If the issue persists, please open a support ticket in our support systems over at: https://support.sliderrevolution.com and we’ll investigate this further for you.
Cheers KC @ Slider Revolution