jQuery
wpGForm now has email notification
3I’ve received a couple of requests to have an email notification sent out when a form is submitted. Today I released v0.26 which supports a new attribute (email=’on|off’) on the gform shortcode. By default email notification is off but when set to on, an email to the blog administrator will receive an e-mail indicating a form was submitted. The email also contains the URL for the form, and date and time the form was submitted.
While I was working on this version, I also decided to see if I could make the custom confirmation work like my original implementation which did not use a Javascript redirect. I had switched to the redirect when I added support for multi-page forms because the mechanism I was using previously no longer worked.
Email can be sent in either HTML or Plain Text formats, there is a new option on the settings page. By default email notifications are sent in HTML format.
The v0.26 version switches from a Javascript redirect to an Ajax page load using jQuery. In my testing it seems to work pretty well and is much less intrusive than the redirect was. Let me know if you run into any problems with it.
The v0.26 release is now available from the WordPress plugin repository and an update will appear on your WordPress Dashboard.
WordPress Google Form update – v0.22
0Yesterday I received a report from someone using WordPress Google Form that their checkboxes weren’t working. This was very confusing to me because last weekend I spent a bunch of time fixing and testing the checkbox problem.
It turns out the jQuery script which fixes the checkboxes to work with PHP was never running. Why wasn’t it running? Because jQuery wasn’t ever loaded. Why wasn’t jQuery loaded? Because wpGForm never loaded it! It turned out the website which reported the problem was using a theme that doesn’t use jQuery and therefore never loaded it.
Well the WordPress Google Form plugin, which needs jQuery, didn’t load it either. I (and I can only assume other people) was never seeing a problem because either the theme or another plugin was loading jQuery.
The v0.22 update corrects this problem which was somewhat of a corner case, but a problem none the less.
WordPress Google Form v0.15 released
0This 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.
WordPress Google Form v0.12 is out
0Yesterday 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
9This 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.
wpGForm v0.11 beta
2I 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.
WordPress Google Form (108)Mutli-Page GForm Update
0I’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.
WordPress 3.3 and WordPress Google Form?
0The answer is: I don’t know yet. WordPress 3.3 came out last night and I am just playing with it now. One of the key features of WordPress 3.3 is the inclusion of the complete JQuery UI library. This definitely affects wpGForm because I am loading one of the UI libraries that wasn’t previously included from Microsoft’s CDN. That will no longer be necessary (yeah!). I guess the question now is what to do about backward compatibility with older versions of WordPress.
Historically I’ve just put a stake in the ground and moved on but wpGForm is the first WordPress theme or plugin that I’ve done that has quite a few users so I’ll probably implement some sort of version detection and conditionally load the UI library from the CDN if running an older version of WordPress. A little more work for me but probably the right answer.
Multipage Google Forms – no solution yet
0Yesterday 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 ….
Read-Only Google Forms?
0This morning I added a new feature to my WordPress Google Form plugin. You can now set a form to be ‘read only’ using the readonly=’on’ attribute in the shortcode. This option, when turned on, use a little snippet of jQuery to disable all of the form elements.
[gform form='<long_url_to_your_google_form>' readonly='on']
I suspect your immediate reaction to this is “why would I want my form to be read only?” and it is a logical reaction. After all, the whole point of creating a form is to collect data right? The purpose of some forms, in fact I’d bet it is the case for most forms, is to collect data for some period of time and after a certain point (e.g. 5:00 PM on October 31), there is no reason to collect data any longer.
Imagine a sign up sheet for working the snack bar at your local High School football game. Once the game has happened, there is no value in letting people sign up any more. The readonly option will allow you to retain the form as part of your WordPress web site while preventing the collection of any more data.
I need to do little more testing before I release an update but so far, it looks pretty good!
Note: The more I think about this, I may want add an expire option after which the form will automatically become read only.
Recent Comments