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.

jQuery( 'div.wpcf7 > form' ).each( function() {
   var $form = jQuery( this );
   wpcf7.initForm( $form );
   if ( wpcf7.cached ) {
      wpcf7.refill( $form );
   }
});
Slider Modal with Contact Form 7 Fix

The Author

KC

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!

5 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:

      https://support.sliderrevolution.com

      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.

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.