[Plugin: Flexible Modals & Contact Form 7] Not working [Temporary Fix attached]
-
Hello everybody,
If I use the flexible modal plugin https://www.ads-software.com/plugins/flexible-modals/ with contact form 7 https://de.www.ads-software.com/plugins/contact-form-7/ I have no Ajax functionality.
This is a short fix for the flexible modal plugin:
diff --git a/wp-content/plugins/flexible-modals/js/jquery.adaptive-modal.js b/wp-content/plugins/flexible-modals/js/jquery.adaptive-modal.js index 7465314..2b4ac2c 100644 --- a/wp-content/plugins/flexible-modals/js/jquery.adaptive-modal.js +++ b/wp-content/plugins/flexible-modals/js/jquery.adaptive-modal.js @@ -319,6 +319,10 @@ } $("body").addClass("am-modal-open"); + var possibleWpcfForms = $('div.wpcf7 > form'); + if(possibleWpcfForms.length > 0 && typeof(possibleWpcfForms.wpcf7InitForm) === 'function') { + possibleWpcfForms.wpcf7InitForm(); + } } // Public Method to Close Modal Programatically
Only bad thing if you do this:
Your contact form 7 in modal have 2 ajax loader – but the ajax functionality works!Please try to make it compatible. Either the flexible modal fix it or Contact form 7 can use jQuery’s “on” method to listen for “click” events. Don’t know ??
Thanks in Advance!
- The topic ‘[Plugin: Flexible Modals & Contact Form 7] Not working [Temporary Fix attached]’ is closed to new replies.