WordPress Google Form v0.27 released

This afternoon I have released v0.27 of my WordPress Google Form (aka wpGForm) plugin.  This release has some new functionality but more importantly, reverts the custom confirmation page to the redirect method which was present from v0.11 to v0.025.

If you prefer the AJAX style custom confirmation, which I do, it is still available by adding the short code attribute style=’ajax’ to your gform short code.

Changes for v0.27 are:

  • Added ability to check and warn for old and/or unsupported browsers. There is an option on the WordPress Google Form settings page to enable this check. When an old or unsupported browser is detected, a message will be displayed on top of the form. The browser check is based on the same functionality that WordPress uses on the Dashboard.
  • Changed default custom confirmation behavior has reverted back to using a javascript redirect as it did from v0.11 through v0.25.
  • Added new shortcode attribute, style, to control how confirmation pages should be handled. There are two options: style=’redirect’ which is the default and style=’ajax’which loads the page content via AJAX.
  • Added new CSS classes to support errors and warnings for the browser check and the inability to load Google Forms.
  • Cleaned up Options page GUI.

WordPress Google Form v0.25 now available

Today I was alerted to an issue where my WordPress Google Form plugin wasn’t behaving correctly. This turned out to be due to the prefix attribute in the gform shortcode not handling it correctly. I have fixed the problem with the prefix attribute and a couple of other things and pushed out a release on the WordPress plugin respository.

Version 0.25

  • Fixed problem with checkbox processing when using the prefix attribute.
  • Fixed problem with hiding legal links when using the prefix attribute.
  • Fixed problem with legal=’off’ attribute not being processed correctly.

WordPress Google Form v0.23

This evening I released v0.23 of my WordPress Google Form plugin. This update fixes a situation where CSS declarations were output as plain text as part of the form. I believe the cause of this was due to an appearance theme for the form being specified in the Google Form Designer. The update should roll out via the WordPress Dashboard Update failrly soon.

WordPress Google Form minor update – v0.21

This morning I have updated WordPress Google Form and fixed a number of documentation problems and added one minor new feature.  While I am not a big fan of Javascript Alerts, I had a request to allow a message to be displayed upon successful form submission.  I have added a new parameter (alert=’message’) to the gform short code to enable this new functionality.

[gform form='https://docs.google.com/spreadsheet/viewform?hl=en_US&formkey=dEYwbGNYVG9TRUhXellMaDBuZ1RQTHc6MQ#gid=0' confirm='http://localhost/?page_id=435' alert='You da man!']

The new release should appear in the WordPress repository immediately and as Dashboard update fairly soon.

wpGForm Bugs in v0.15

I have been alerted to a couple of bugs in the current (v0.15) version of wpGForm that I am working on fixing.

  1. Select boxes do not retain their value when going back on multi-page forms.  I’ve already fixed this problem in my development build.
  2. Check boxes are not passing their values correctly.
  3. Sometimes Radio buttons do not retain their values when going back on multi-page forms.

This third item is proving difficult to track down. It is odd that some questions with radio buttons work fine going back and forth between pages but others do not.  If I can fix the check boxes this morning I will likely release an update that addresses the first two bugs and keep working on the third problem.

WordPress Google Form v0.12 is out

Yesterday I committed and tagged the v0.12 release of my WordPress Google Form plugin.  It is available from the WordPress plugin repository.  The main feature of this release is support for multi-page Google Forms.  The changes made to support multi-page forms should also enable use of fields that have optional answers.

There is still some leftover code from the old validation process that I was reluctant to completely remove until I know for sure this new architecture is working in more use cases than I have to test with.  There will likely be another update that is nothing more than a code clean up in a couple weeks unless someone reports a problem.

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.


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.

Multipage Google Forms – no solution yet

Yesterday I had some time to look at supporting multipage Google Forms.  Unfortunately it doesn’t look like it will be possible because of the way multipage forms work.  As you work through a multipage form Google adds hidden values to each successive page to facilitate moving forward and back without losing any data.  Pretty standard stuff for a “wizard-like” form implementation.

The problem is the way the plugin is implemented, the HTML code for the form is extracted and then re-processed before being added to a page within WordPress.  What I’ve implemented works fine for a single page form, actually, in my opinion, it works pretty well.  However, detecting the page transitions and obtaining the hidden form fields either isn’t easy or isn’t possible.  Right now I am leaning toward the later because the hidden fields are generated based on the prior page (Continue or Back) form submission.

What I have successfully made work is to use the “embedded” version of a Google form within a WordPress page.  It works but aesthetically it looks awful.  What I am playing with right now is some jQuery to try and manipulate the embedded form to use the styling from the site instead of from Google.  We’ll see how it goes ….

TwentyEleven Child Theme Learnings

For the past week or so I’ve been playing around with a TwentyEleven child theme for a soccer team project I am fiddling with.  For the most part I’ve been able to accomplish what I want using a TwentyEleven child theme.  Using TwentyEleven as a base for this project isn’t bad but it certainly is different than using a theme framework (e.g. Thematic).

Last week I had posted that I didn’t care much for how the header was constructed and after working with it for a week, I still feel that way.  TwentyEleven has a number of filters and actions but customizing the header isn’t among them.  I also find it very odd how the default behavior is to use featured images as the header if there is one available.  I can’t imagine what application that turns out to be a good thing.  Fortunately it is fairly easy to disable that and set your own header.

TwentyEleven has a showcase template that is sort of like a magazine style but not exactly.  For it to work it requires that posts be tagged as “sticky” which also means they appear at the top of the list in a standard chronological post view.  What I really wanted was functionality like the showcase for the latest articles and let that view become the default home page.  I was able to accomplish this by copying the showcase.php file from TwentyEleven into my child theme directory and calling it latest-news.php.  I now have a new template that shows the five latest posts using the featured content slider which TwentyEleven has built into the showcase template.

Now that I have it working, I am finding that images in the showcase template are wonky and adding a featured image really messes things up.  I am sure I’ll figure it out but the decisions the theme designer(s) made in this area are odd.  It’s like having an 80% solution but the other 20% will take a while to work out.

The one thing I am pretty happy with though is how well it seems to work on my iPad and I didn’t have to do anything special to make it work.  It just works which is nice.  Once I am done with this I will probably turn it into a generic soccer theme but for now it is really only useful for CASL teams.