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.

Yet another update! WordPress Google Form v0.18 available

I have just released another update to the WordPress Google Form plugin.  Within the HTML code that Google generates for their forms, each input field has  unique identifier (e.g entry.0.group, entry.47.group, entry.6.single, etc.).  There was a bug in the Regular Expression which incorrectly handled these identifiers when then had more than one digit.  This bug is fixed in v0.17.

Why do the identifiers need to be processed?  The need to “massage” the identifiers is due to the fact that WordPress is based on PHP and Google Forms are processed by Python.  The two languages handle passing form parameters slightly differently.  When the form is submitted on the WordPress side, the periods in the id are translated to underscores by PHP.  Inputs like check boxes which may contain multiple values are handled using arrays in PHP where as Python allows the use of the same identifier multiple times.  In order to submit the form values to Google, any value received as an array must be converted to a multi-value and the underscores need to be translated back to periods so they match the Python script on the Google side which actually processes the form and stores the result in a Google Spreadsheet.

There was a mistake in the logic which transforms the identifiers from PHP syntax to Python syntax.  It didn’t correctly handle more than one digit in the identifier resulting in the wrong identifier names being sent to Google.  This also caused loss of input values when a required field was not supplied.

Hopefully this will be the last problem!

WordPress Google Form plugin v0.16 released

This morning I uploaded a new version of my WordPress Google Form plugin.  This update addresses the three items I noted in this post.  I also expanded the Test Bed Form I have  been using to develop and test the plugin.  If you’re curious, I have added the form to a page on this site.  If you run into a combination that isn’t working and I haven’t accounted for it in the test bed, please let me know and I’ll update my form.

I think I finally have Check Boxes working correctly.  They were a challenge because how PHP (which WordPress uses) pass arrays of information and Python (which Google Forms use for processing) are very different.  Thanks to a tip on the WordPress Hackers Mailing List to a utility called http://httpbin.org I was able to get my plugin to pass the parameters as Google expects them and everything seems to be working correctly.  The update should appear in your WordPress Dashboard fairly soon.

WordPress Google Form v0.15 released

This morning I fixed the problem with the default settings which caused any of the settings which are on by default, to be on no matter what.  Even when the user would turn them off, the plugin would ignore the user setting which was being saved correctly, just ignored being ignored by the during the default check.

I also finished removing the jQuery-Validate plugin as it is no longer used as well as a bunch of debug code and functions which are no longer used.  Updates should appear on your Dashboard soon and it is already available for download in the WordPress plugin repository.

Quick bump to v0.14 for WordPress Google Form

While looking at a CSS styling problem for someone I encountered a minor bug on the Options page.  The plugin wasn’t picking up the default options correctly and in some cases a PHP array index warning would appear on the Options page.  This bug has been fixed and I’ve released v0.14.  You can download it from the WordPress plugin repository or update it from the Dashboard.

WordPress Google Form v0.13 fixes “back” bug

I have just committed v0.13 to the WordPress plugin repository.  An update should appear in your WordPress Dashboard fairly soon.  This update fixes a problem when using multi-page Google Forms which have radio buttons and check boxes on them.  When the “Back” button was selected to view the previous page of the form, the previously selected values were not retained.  This bug has been fixed and the “Back” and “Continue” buttons now work as expected.

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.

[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]

WordPress Google Form bug fix

In the process of trying to solve the multipage Google Form problem, I found a bug with the “Confirmation” page.  When a custom confirmation page isn’t supplied, the plugin is supposed to use the default Google conformation page.  It currently isn’t, instead the page the form is on is rendered again.  This is incorrect behavior and I’ve fixed it in my development thread and it will appear in the next release.