WordPress Google Form v0.45-beta available

I’ve made a subtle but potentially significant change to WordPress Google Form that I am looking for some people to try out.  The plugin generates a jQuery script on the fly to perform a number of actions depending on the shortcode attributes present and their setting.

Historically the jQuery script has been output as part of the form code but I’ve seen a number of cases lately where another plugin or in some cases, the theme, is manipulating the page content which ends up affecting the jQuery script.

In one case I looked at this weekend something, I am still not sure what, is injecting paragraph elements into the HTML after it detects a closing DIV tag.  For the most part this isn’t a big deal except, there are closing DIV tags in the jQuery script as part of the CAPTCHA functionality.  The CAPTCHA functionality injects a DIV which holds a second DIV and some other input elements and labels.  What ever is injecting the P elements into the HTML after every closing DIV is causing my script to have syntax errors when the page loads.

To solve this problem I have moved to loading of the jQuery script into the WordPress footer action.  In my testing making this change  has zero effect on the functionality but I’d like some other people to test it and provide me feedback.

Google Forms Beta (462 downloads)

11 thoughts on “WordPress Google Form v0.45-beta available

  1. Thanks Mike. I wonder if this is not a theme issue. Do you want me share this with the theme dev – if he is intrested 🙂

    • You are more than welcome to share with the Theme Developer however I am not certain it is a theme issue. It could be a theme issue or it could be a plugin doing it as well. I’ve seen something like this before which is why I added code a while back to remove all of the line breaks and squash the jQuery script into a single line. That works for most cases but wouldn’t fix it if the DOM is being manipulated by jQuery which is what I think might be happening. I am hopeful that moving the jQuery script into the fooeter area will help prevent this scenario from even being an issue. Have you been able to try the beta version?

Leave a Reply