wpGForm v0.11 beta update

This morning I posted an updated wpGForm v0.11 beta release.  This updated beta introduces two new shortcode attributes:

  • title=’on|off’ – Show (default) or remove the Google Form title.  The title is often redundant with the WordPress post or page title, this attribute will allow you to remove the title from the HTML displayed within the WordPress context.
  • maph1h2=’on|off’ – Map H1 elements (usually just the title) on the Google Form to H2 elements.  This allows you to retain the form title from the Google Form but map it’s H1 tags to H2 tags which prevents multiple H1 tags from appearing on the WordPress page (which I understand is an SEO no-no).

This build also includes default CSS definitions for div.ss-q-help classes.  Why the help text appears adjacent to the question as opposed to on top of it is a question comes up pretty frequently.  This CSS makes the output more consistent with how Google presents the form so I’ve decided it should be the default.

label.ss-q-help {
    display: block;
}

I’ve also started removing debug and obsolete code.

[download#7]

wpGForm v0.11 beta

I am currently running a beta version of wpGForm v0.11 here on my site.  The big change for this version if the support for multi-page Google Forms.  You can see how they work using my Sample Multi-Page Google Form.

I am looking for some people to test this version and provide feedback.  If you can check it out and provide some feedback I’d really appreciate it.  There are quite a few changes in this version due to the rearchitecture required to support multi-page forms.  There shouldn’t be any changes to what is actually rendered for the user.

This version also fixes the confirmation page bug that has been present when a custom confirmation page wasn’t specified.  The behavior of the custom confirmation page is slightly different too in this version.

[download#7]

Mutli-Page GForm Update

I’ve been trying to find a solution that will allow wpGForm to support multi-page Google Forms.  I realize that this is a pretty important feature for people who use Google Forms and my lack up updates or news isn’t from lack of effort!  I’ve tried a number of things, each of which hasn’t worked out.

The single page Google Form works pretty well but even with it, there are still a couple of minor nits (e.g. properly handling optional fields).  I’ve thought that if I can find a better way to handle multi-page forms that I may also be able to eliminate the limitations that single page forms have too.

The problem with trying to do what I am trying to do is that Google Forms aren’t really designed to be anything but their own entity.  Yes, you can embed them with an IFRAME tag and they will work correctly but there is no way to modify the HTML in an IFRAME due to Cross Site Scripting (XSS) security concerns.  Yesterday I thought I had a clever solution that used jQuery and AJAX to load to the result from a form submission using a small script within the plugin to submit the form and then WordPress could load the results from the plugin script eliminating the XSS concern but I couldn’t get it to work reliably (and it was slow).

I’ve been using wp_remote_get() to retrieve the contents of the Google Form since I started this plugin.  Why it never occurred to me (until last night) to use wp_remote_post() to submit the form to Google I have no idea.  This was one of those “Doh!” moments we (at least I do and I am pretty sure I am not alone) have when you simply get caught up making the problem much harder than it needs to be.

This morning I noodled on this while I was at the gym and from my preliminary experiments, it looks like it is going to work.  No promises or commitments yet but this path is the most promising I’ve explored since I’ve started looking at the multi-page form problem.  So far I’ve been able to submit a multi-page form however only the first page of the form is styled correctly and the confirmation page isn’t working properly either.  I think both are solvable.

I am posting this because this question comes up a few times a week and I am sure the lack of progress I’ve demonstrated may result in lack of confidence for the plugin.

Assuming I get this flushed out in the next day or two, I’d like a couple volunteers to test the plugin before I release and update through the WordPress plugin repository.  Please let me know if you’d be interested in testing an early build.