Tagged: x
-
AuthorPosts
-
March 17, 2017 at 9:10 am #1411011
LelyModeratorHi There,
It makes the website not functioning because of a javascript error coming from the form:
Uncaught ReferenceError: __machform_height is not defined at HTMLDocument.<anonymous> (machform_loader.js:6) at i (jquery.js:2) at Object.fireWith [as resolveWith] (jquery.js:2) at Function.ready (jquery.js:2) at HTMLDocument.K (jquery.js:2)A javascript error will stop other funtionalities that is using javscript from working.
I have tested the form on my test site. I add the following code on functions.php:function custom_form( $atts ) { ?> <script type="text/javascript"> var __machform_url = "http://virginiabeachdoula.com/forms/embed.php?id=10248"; var __machform_height = 1498; </script> <div id="mf_placeholder"></div> <?php } add_shortcode( 'myform', 'custom_form' ); add_action('wp_head','custom_script'); function custom_script() { ?> <script type="text/javascript" src="http://virginiabeachdoula.com/forms/js/jquery.ba-postmessage.min.js"></script> <script type="text/javascript" src="http://virginiabeachdoula.com/forms/js/machform_loader.js"></script> <?php }As you can see, I did remove the following line because it was already loaded by wordpress:
<script type="text/javascript" src="http://virginiabeachdoula.com/forms/js/jquery.min.js"></script>
I made the next two script two load on the head part. Then the exact code that is supposed to display the form, I add it as shortcode so it will display anywhere we put the shortcode[myform]See this implementation: http://screencast-o-matic.com/watch/cbeb2Q6kIc
Now the error will stop other functionalities from working. Unfortunately, since it is a third party code, you have to consult the author on for that.
Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1407288 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
