Javascript, Wordpress
Fix WordPress Contact Form 7 on Elementor Popup
Elementor is a popular editor solution for Workpress. But one difficulty that I have faced is for some reason, Contact Form 7 Ajax does not work on Elementor Popups. Below is the fix for this.
<script type=”text/javascript”>
$(document).on( ‘elementor/popup/show’, function() {
document.querySelectorAll(“.wpcf7 > form”).forEach( function(e) {
if(!$(this).hasClass(‘popupInit’)) {
$(this).addClass(‘popupInit’);
wpcf7.init(e)
}
});
});
</script>
This should help fix the contact form 7 loading issue on Elementor Popups.
About Kaustav
I have decades of experience is software development using .Net Technologies, PHP and wordpress. I love coding and discovering new tech.
You may also like
Code Improvement, Coding, Database Management, Server Management
In the ever-evolving world of software development, having the right tools at your disposal can make a significant difference in productivity, efficiency, and overall project success. From coding to testing, and from version control to deployment, here are some essential tools that every developer should be familiar with: 1. Version Control: Git and GitHub Git […]
Javascript
In the ever-evolving world of JavaScript, how we declare variables has undergone a significant shift. The traditional var keyword has been joined by the more refined let (and its companion const). Understanding the distinctions between these keywords is crucial for writing clean, predictable, and maintainable JavaScript code. Scope: Where Your Variables Live var – Function-scoped: […]
0 Comments
Be the first to comment