Email Users v4.8.0-beta-1 available

Earlier today I released Email Users v4.7.10 which is the formal release of a number of fixes I’ve had in the queue.  Now that it is out, I’ve moved on to the first real new functionality in a while which is why this will be v4.8.x.

Recently there was a 1 Star rated review of Email Users which had a comment about not being able to search for a user in a list of potential recipients.  As you can see in the comments, I didn’t disagree with the user although what they wanted to do was sort of possible.

I’ve used the jQuery Chosen plugin a couple times and it works great for making SELECT elements much more user friendly.  I decided to add it to Email Users to make finding users, particularly for sites which have lots of users, much easier.  If you used WooCommerce, you’re familiar with Chosen as that is what WooCommerce uses for SELECT elements as well.

The v4.8.0-beta-1 release is the first implementation of Email Users with the jQuery Chosen plugin integration.  Please download it, try it out, and report any issues or concerns.

Implementing Chosen allows for easy search and selection as noted in these images.

EU_SS_47

From the Send to User(s) page

EU_SS_48

From the Send to Group(s) page

EU_SS_49

From the Send to Group(s) page after entering “au” to do some filtering

Email Users Beta (71 downloads)

Google Forms v0.73-beta-1 now available

It has been a while since I’ve done an update to Google Forms. There weren’t any glaring bugs (that I was aware of) but there were a number of requests that I had yet to handle and one (unnecessary Javascript loading) has been on my to-do list for a long time. In this build are several changes and a couple of enhancements.

  1. Javascript is now loaded only when needed.  When a form is displayed, the relevant Javascript is loaded.  It is no longer loaded on every page like it has been historically.  The same is true for CSS.
  2. While fixing #1, I found that I was also loading Javascript on the Dashboard on every page as well as opposed to limiting it to when a Google Form was being edited.  There was a bug in the logic used to detect when a form was being edited which has been fixed.
  3. The plugin has long supported the ability to override the default Google text on a global basis.  This has been extended to form specific overrides.  This means the “Submit” button can be different on every form if desired.  Form specific overrides take precedence over global overrides.
  4. After submission, Google Forms show, unless hidden with CSS, a “Submit another response” link which links back to the Google Docs version of the form.  This link is now replaced with the proper link to URL where the form appears on the WordPress site.

Please do some testing with this beta version and report any problems.  I will do my best to fix them quickly as I would like to get this version released as soon as possible.

Google Forms Beta (157 downloads)

Working with Rails

Last fall I had written a post where I noted that I had a problem to solve at work which I thought might be well suited for Ruby on Rails.  Like a lot of side projects, this one never went anywhere but I did end up playing around with RoR enough to get an idea of how it works and how quickly things can be developed with it.

I do some volunteer work with our High School Booster Club and last year built them a WordPress based site which is largely used to facilitate the purchase of memberships.  While it seems like overkill, the plan is to use the web site to host more content relevant to the various athletic teams.

A couple months ago I was approached about how the Booster Club’s mobile app could be improved or replaced as the currently technology is being withdrawn and no longer supported.  I learned that the back end for the mobile app was extremely cumbersome to use and was a source of frustration for the people who maintain rosters, schedules, results, etc.

I am now working on a replacement for the Mobile App and the backend infrastructure.  Because we already have a WordPress site, I had considered using the WordPress site to host all of the data and leverage the WordPress JSON REST API plugin to serve content up to a Mobile App.  But I had some reservations.

jQueryMobileBookI’ve never done Mobile App development and in the interest of time, am not sure I want to take that on right now.  Based on my jQuery experience with WordPress, I thought a jQueryMobile web app might be a reasonable compromise.  I picked up a copy of jQuery Mobile Up and Running a while back when I had heard it referenced on a Podcast.  At the time I didn’t have an immediate application for it but it was interesting reading.  I dusted it off and realized jQuery Mobile would be a good solution for building a prototype mobile web app.

So now I have some thought in my head of a mobile web app I want to build but wasn’t sure about how to feed it.  While I could see putting all of the data in WordPress, I was worried about maintaining it.  I need something dead simple to enter rosters, teams, schedules, results, etc. into a system.  Ideally it should be accessible from a phone so scores can be quickly entered by unsophisticated users.

What I’ve decided to do is build a mobile first (maybe only) application using Ruby on Rails.  I have made all of my HTML views based on jQuery Mobile.  Within a week or so of working on it for a few hours a day, I have the basic application up and running on my Ubuntu VM.  I can set up teams, coaches, and athletes, and assign coaches and athletes to teams.  I have started on venues.  There is a ton left to do – events, schedules, user login, Google Maps, and a lot more.

While I am excited about how much progress I have made in a relatively short time frame, I am worried I am “doing it wrong” or have made a decision that will be difficult to unwind.  I’ve learned a fair amount about Rails in the past two weeks and much to my surprise, have not had to learn a whole lot of Ruby yet.

The ability to quickly add database columns and connections in RoR is pretty slick.  During my first couple of scaffold generations I was worried about getting the database “right” but having dropped some columns and added others, I’ve found it relatively painless.

While I am impressed with RoR, I am really impressed with jQuery Mobile.  It is pretty amazing how quickly a mobile web app can be assembled.  I’ve been using a regular web browser for developing my app and even using jQuery Mobile with a regular browser is pretty nice.  I had forgotten that the laptop I borrowed while my Vaio was being repaired has a touchscreen.  Using the app on Chrome with a touch screen is pretty effective at mimicking a mobile device.

I still have tons more to learn as I get ready to deploy the first build for some people to play with and populate with dummy data but I can already see other uses for Ruby on Rails.  I am still not a big fan of the Ruby syntax but I can live with it for the benefits and development efficiency I am seeing with Rails.

Google Forms v0.69 released

While looking into a Support request I discovered a bug in the generation of the  jQuery validation script which caused a syntax error.  This syntax error could potentially cause problems with redirection upon form submission.

While fixing the above bug I also added support for embedded images which had been requested recently.  When you design your form Google now allows the insertion of images and now Google Forms will display them properly.

GForm_SS_71

You can find this update on your Dashboard or in the WordPress plugin repository.

Google Forms v0.65-beta-2 available

I received a patch over the weekend from a Google Forms user which I have incorporated into beta-2 of v0.65.  The patch changes how Google Forms loads the jQuery Validation plugin from the Microsoft CDN.  The plugin is now loaded using a protocol relative URL.  This change will eliminate the mixed content message which appears on sites using HTTPS.

There are a couple other minor fixes in this build as well, the most notable a flush of re-write rules upon plugin activation or de-activation in hopes that it will eliminate one of the most common questions I receive (why doesn’t my URL work when I click the View Form button?).

Google Forms Beta (157 downloads)

Google Forms, Checkboxes and PHP 5.4 or 5.5

WordPress Google Form v0.63 introduced a change  which allowed the plugin to work on newer versions of PHP, notably 5.4 and 5.5.  Unfortunately that change has broken support for checkboxes.

For those who are new to the plugin or never needed to know how it worked, what the plugin does is retrieve the HTML for the form from Google and render it within the context of WordPress.  When the form is submitted, it is actually submitted within the context of WordPress.   The data is collected by the plugin and then submitted to Google.  The retrieval from and submission to Google is done with the WordPress HTTP API.  In particular, the wp_remote_get() and wp_remote_post() functions are used to retrieve and submit the form.

To complicate the problem further, Google uses Python as the backend for their form processor where as WordPress uses PHP.  For the most part, the fact that they are based on different scripting languages isn’t a big deal.  Until you get to checkboxes.  Checkboxes in Python are handled differently than they are in PHP.

I had solved the compatibility problem a couple years ago (see this thread on the wp-hackers mailing list) using a small jQuery script which fixed the form variables on the WordPress side and manual construction of the body parameter for wp_remote_post() when submitting the data to Google.  This solution worked fine until I received a bug report that nothing was being submitted on a site which was running PHP 5.4.x.

Fortunately the user who encountered the problem provided me with a patch that I was able to fold in which changed the way the body parameter was constructed (array instead of a string) which worked with PHP 5.4.x and also worked with older versions.  However, I didn’t test it thoroughly as I have had several reports that checkbox content was not being submitted correctly.  Uh-oh.  I was able to verify the problem fairly quickly and was able to push out a version which essentially reverts how the body parameter is constructed (string instead of an array).  The problem is, this build doesn’t work with newer versions of PHP.

I have PHP 5.5 running on an Ubuntu virtual machines for testing and so far, I have not found a solution which (a) works with PHP 5.5. and (b) submits checkboxes correctly.

Stay tuned.

WordPress Google Form v0.61 is out!

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

GForm_SS_69

This release also addresses some issues with missing CAPTCHAs which would happen under certain circumstances.  The jQuery generation is much cleaner now as well.

You can find this update in the WordPress plugin repository or on your WordPress Dashboard.

WordPress Google Form v0.61-beta-5 available

Another beta update, #5, for WordPress Google Form v0.61.  This update fixes a couple more issues with validation which resulted in some extra jQuery content that was malformed.  It only happened IF validation was enabled but no custom validation rules were defined.

Google Forms Beta (157 downloads)

WordPress Google Form v0.61-beta-4 now available

I have just uploaded beta-4 of WordPress Google Form v0.61. This build corrects a couple more jQuery issues when using multiple instances of a form on the same page. In order to use multiple instances of the same form on a single page, you must use the uid parameter with the wpgform shortcode. Usage of this new parameter is outlined in the v0.61-beta-1 announcement.

The uid parameter is not supported in the deprecated gform shortcode.

Please download and test this beta release, all feedback is much appreciated.

Google Forms Beta (157 downloads)

WordPress Google Form v0.61-beta-2 available

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.

Google Forms Beta (157 downloads)