herandesign
Forum Replies Created
-
Forum: Plugins
In reply to: [Email Before Download] Inline link not appearing, everything else works@knightsmith – Try this link to get your COntact Form 7 Ajax functioning correctly, this is what worked for me.
https://venugopalphp.wordpress.com/2014/01/08/ajax-not-working-in-contact-form-7/
Just realised I didn’t paste the above as code and it messed up the apostrophies making it unusable. Here is the correct version
<script type='text/javascript' src='/wp-content/plugins/contact-form-7/includes/js/jquery.form.min.js?ver=3.40.0-2013.08.13'></script> <script type='text/javascript'> /* <![CDATA[ */ var _wpcf7 = {"loaderUrl":"\/wp-content\/plugins\/contact-form-7\/images\/ajax-loader.gif","sending":"Sending ..."}; /* ]]> */ </script> <script type='text/javascript' src='/wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=3.5.2'></script>Courtesy of https://venugopalphp.wordpress.com/2014/01/08/ajax-not-working-in-contact-form-7/
- This reply was modified 9 years, 2 months ago by herandesign.
- This reply was modified 9 years, 2 months ago by herandesign.
- This reply was modified 9 years, 2 months ago by herandesign.
I’ve managed to fix the issue now. As was indicated, there was some kind of error preventing AJAX from loading the response inline
There are two things I had to do to fix the issue for me. One was that I pasted the script below into the wp-head.php file just above the </head> tag.
<script type=’text/javascript’ src=’/wp-content/plugins/contact-form-7/includes/js/jquery.form.min.js?ver=3.40.0-2013.08.13′></script>
<script type=’text/javascript’>
/* <![CDATA[ */
var _wpcf7 = {“loaderUrl”:”\/wp-content\/plugins\/contact-form-7\/images\/ajax-loader.gif”,”sending”:”Sending …”};
/* ]]> */
</script>
<script type=’text/javascript’ src=’/wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=3.5.2′></script>This fixed the AJAX issue for me, but I found something else was interfering with form submission and this turned out to be the Google Analytics plugin we use was set to ignore the Administrator, so that was causing the form to fail when I used it (logged in as admin).
Thanks for your advice, I’m happy to have this working correctly now!
Thanks for the advice. I haven’t been able to get it working yet on this site, just due to time constraints but I’m sure what you’ve said is correct and I just need to find the plugin that’s causing the issue with AJAX. I have managed to set this up successfully on one of the other sites I manage which is a start.
I’ll update when I find the cause of the problem.