This morning I posted the first beta of WordPress Google Form v0.64. There is no new functionality in this version, it just addresses a bunch of strings which were not properly set up for language translation.
If you want to provide a language pack for WordPress Google Form, this is the best version to work from. I am currently working with a user who is working on a French translation.
After a couple days of testing and five beta releases, I have released WordPress Google Form v0.61. This build supports multiple instances of the same form on a single page.
Why would you do this? It turns out, it is a fairly common request. A number of people have uses of the same form where some of the fields are hidden and preset (both features were added fairly recently) which allows them to present the form in different ways with seeded input while allowing the user to complete the rest. Because the form instances are all based on the same Google Form, they will have the exact same entry elements with the exact same attribute IDs. HTML does not allow multiple elements to have the same ID attribute, the behavior is unpredictable.
To support this new feature, a new parameter, uid, has been added to the wpgform shortcode. The uid parameter can be set to any string which is legal for an HTML element ID attribute. When the Google Form is processed, all of the attributes are modified to include the uid parameter to ensure they each have a unique value.
[wpgform id='879' uid='B-']
This release also addresses some issues with missing CAPTCHAs which would happen under certain circumstances. The jQuery generation is much cleaner now as well.
The second beta build of WordPress Google Form v0.61 is now available. This beta build addresses some jQuery syntax errors introduced in the process of supporting multiple form instances. It also addresses a bug where the CAPTCHA would not be output as part of the form under certain circumstances.
Please download and test this new build if you have time and report anything which isn’t working.
About a week ago I was approached with an interesting problem. A user wanted to have the same form on single page three times. Three instances of the same form. Each instance would have some hidden values to determine which form was submitted.
The problem was by putting the same exact form on the page multiple times, a lot of the content (id and name attributes) was duplicated and as such, caused problems upon submission or even trying to move from field to field on the form. The current (v0.60) version of the plugin is effectively broken for multiple forms except in the simplest of cases (no CAPTCHA, validation, presets, etc.).
I’ve come up with a solution that needs some testing. I’ve added a new short code attribute to the wpgform shortcode which takes a string value and uses it as a unique identifier to ensure the replicated fields are actually unique in the source HTML.
In the image below you can see the text “B-” has been prepended to the id attribute for the form tag and an input tag. The “B-” was the value of the uid parameter in the shortcode for the form.
[wpgform id='879' uid='B-']
Download this beta version and run it through its paces. The ripple effect of this change across the code was pretty significant so I’d like to make sure it didn’t break anything.
The beta-3 release of WordPress Google Form v0.59 is now available for testing. This latest update includes basic support for using the plugin to embed Google Spreadsheets in WordPress (yes, it can do that – see this post). When you use the published HTML page URL for a Google Spreadsheet as the URL source when defining a Google Form, you will end up with something which looks like this:
You can view this spreadsheet/form page here. You can use form specific Custom CSS to tailor the table to meet your needs too. I used the following Custom CSS to get the columns evenly spaced:
This morning I released beta-2 of WordPress Google Form v0.59. This build introduces one new feature (hidden fields) and fixes one limitation (validation rules).
Much like validation rules and placeholders, an input field can now be defined as hidden. When a field is defined as hidden, it does not appear to the user when they view the form and the value is set to a fixed value (e.g. a static string) or to something WordPress derives (e.g. the user’s IP address).
The format of the field name is exactly the same as used for validation and placeholders.
Validation has been improved and the limitation of one validation rule per field has been lifted. You can now define multiple validation rules for a single field. Simply enter the field name for each separate type of validation.