More on Event Groups

As I continue to work away on Event Groups and Event Management overall, I have realized that what I had implemented earlier was really poorly thought out.  The way I had defined events and assigned them to a swim meet really isn’t very useful.  The Event model will change quite a bit as I flush this out.  It is possible that it will be necessary to delete any existing events and redefine them using the new model.  I haven’t completely worked it out yet but that is likely where I am headed.  It makes the code too ugly to try and deal with old data that really isn’t used for anything in the new model.

I hope to have a release soon which has the base functionality done since I’ve also fixed a few other odds and ends while I’ve been in the code.

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.

Highlighting Missing Fields on a Google Form

A user of my WordPress Google Form plugin asked how to highlight the required fields on a form but only after submitting for the form without providing all of the necessary fields.  Essentially, how show an error more clearly, much like Google does with their forms when run standalone.

Here is a form that has required fields before it has been submitted:
Form with required fields before submission
Here is a form that has required fields after it has been submitted:
Form with required fields after submission
Note that the form label is now red instead of the original black. To have the field text appear in red only after submitting the form without providing the required field, I used this CSS:
div.errorbox-bad div.ss-item-required label {
color: red;
}

If you use the prefix attribute in your short code you’ll need to adjust the class names accordingly. There are quite a few CSS tricks you can do to highlight errors and for experimenting, I recommend FireBug to tweak CSS without having to reload the page each time.

Custom Confirmation problems with v0.26

In v0.26 of WordPress Google Form I changed how I was handling the custom confirmation page as many people had told me they didn’t like the redirection which caused a rapid page reload.  The new mechanism does a partial page reload using Ajax so the effect is much more graceful but I have heard from several people that it isn’t working for them.

If you are having this problem, please let me know so I can figure what is going on as it is working fine in my development and testing area.  I am still looking for a more graceful solution but the model I used before supporting multi-page forms simply won’t work with multi-page forms.  Multi-page forms are too important and commonplace not to support them.  Sort of a catch 22 for now but I am trying to find a viable alternative.

wpGForm now has email notification

I’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 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.

Unintended Consequences …

Last night while I was at my daughter’s basketball practice I finished up modifying the Events functionality to account for the new events groups which will allow events to be bundled into logical groups.  As I was testing everything and things seemed good to go, I realized that the Drag-and-Drop event re-ordering won’t work correctly.

The DnD re-ordering assumes there is only one set of events so as the events are rearranged they are renumbered from 1-N.  This isn’t a show stopper but I will have to come up with a new solution.  In the process of playing around with some ideas I have determined that the jQuery plugin I was using has been updated to support touch so I have folded that in and everything which was working still works.

I had hoped to get a new release out this week but that is unlikely to happen at this point.  I am not going to release anything until I have the event reordering fixed unless I get a serious bug report in which case I’ll simply disable Drag-and-Drop reordering until I get it working again.

Preview of Event Groups

This morning I finished up the first phase of Event Groups.  The Event Groups tab will appear on the Management Menu.  The next step is to up date the Event functionality to recognize the new Event Groups.  When I roll this out this update it will require a database update which means deactivating the plugin and re-activating it.

Event Groups

I’ve started on the Event Groups idea I posted about last week. The more I think about this, the more I like it.  In my case, I have three distinct sets of events I have to worry about:  Short Course Yards, Short Course Meters, and our local Invitational which is also Short Course Yards but is a different set of events from what our league normally swims.

By “grouping” a set of events with a label (e.g. Short Course Yards), it will be trivial to assign a set of events to a swim meet.  I have decided to hold off on events import until Events Groups are done so a set of events can be assigned to a group upon import.