Slider Modal with Contact Form 7 Fix

This article will show you how to fix the Contact Form 7 when it is used in a Slider Modal.

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 and replace the slider API number.

// Replace revapi01 with your current slider API number

revapi01.bind("revolution.slide.onchange",function (e,data){
   jQuery( 'div.wpcf7 > form' ).each( function() {
     if (this.dataset.wpinited!==true) {
      wpcf7.init( this );

To locate your current slider API number, open the API tab and click on a method.

Slider Modal with Contact Form 7 Fix

The Author


Strength does not come from winning. Your struggles develop your strengths. When you go through hardships and decide not to surrender, that is strength.

Liked this Post?
Please Share it!

7 thoughts on “Slider Modal with Contact Form 7 Fix

  1. 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.

    1. 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:

      Cheers Dirk @ Slider Revolution

      1. 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.

  2. 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!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.