Integrating PayPal and Google Forms

As I told a co-worker 20+ years ago, there is no better way to learn how to do something than having a problem to solve.  I need to solve a problem.  My WordPress Google Form plugin originally came from a project to help our Middle School Athletics Booster Club.  It solved the problem at hand but over time I’ve added more features to it, not because the Booster Club needed them but because people asked or they were interesting problems I was compelled to solve.

Our Booster Club now wants to have an Online Shop and after playing with a couple of eCommerce plugins, I’ve decided to go with WooCommerce.  The only thing really missing is the ability to sell a Booster Club Membership.  Our membership process isn’t easily handled by any of the eCommerce plugins I’ve looked at.  WooCommerce has a paid for add-on module that looks promising but I am reluctant to buy something without trying it first.

I’d really like to inject a PayPal “pay” button into WordPress Google Form and simply use it for our membership registration but doing so isn’t simple.  PayPal makes the Payment API look very simple in their documentation but from what I’ve read, it isn’t quite so simple.

With as much mucking around with the DOM I’ve done to Google Forms usiing jQuery I don’t think it would be too hard to insert a PayPal button in place of the Submit.  Handling all of the handshaking isn’t quite as simple though.  There doesn’t appear to be an easy solution but that is what makes for a good problem.  I’ll keep noodling on it, there has to be something I can.

Email Users v4.3.15-beta available

This morning I have made a beta version of Email Users v4.3.15 available for download from this site. I have not posted this version to the WordPress plugin repository yet as I’d like to get some additional testing done on it before doing so as well as incorporate any translation package updates as I can before the final release (which I will likely label v4.4.0).

There are a couple of significant new features and a number of bug fixes in this version.

  1. Fixed the problem where a dollar sign in the post or page content followed by a number disappears.  This was happening due to  preg_replace() seeing the $nn pattern as part of its regular expression processing.
  2. Fixed issues with user settings disappearing.
  3. Added the ability to include the sender in the recipient list as an options setting.
  4. Fixed bug which prevented WordPress Dashboard and Menu Manager from working correctly.
  5. Changed a number of strings to make the process of creating a language package much easier.

Download the beta release and please let me know if you run into any issues.

Email Users Beta (6001 downloads )

WordPress Google Form v0.46-beta available

This afternoon I made a beta version of WordPress Google Form v0.46 available for download from this site. I have not posted this version to the WordPress plugin repository yet as I’d like to get some additional testing done on it before doing so.

There are a could of significant new features and a few bug fixes in this version.

  1. Columns!  You can now have your form rendered in columns.  To have a two column form, add the attribute columns=’2′ to your short code.
  2. When enabled, the simple math CAPTCHA will now appear above the Submit button instead of below it.
  3. Some minor CSS updates to support the new column feature.

Download the beta release and please let me know if you run into any issues.  You can see an example of multi-column support on my Multi-Column Test Bed Form.

Google Forms Beta (9293 downloads )

Adding columns to a WordPress Google Form?

I’ve received a few queries as to how a Google Form could be styled such that the form would appear to have columns.  I’ve looked at the HTML and CSS that Google provides and if it can be done in CSS, it is beyond my current CSS skill set!

That said, I think it is an interesting question and I had looked at solutions using jQuery a few months ago.  I saw one jQuery plugin in particular that looked promising but didn’t have much time to really dig into it at the time.

I received another request for columns today so I took a look at the problem again to see how hard it would be.  Here is one of my example forms split into two columns to give an idea of what this might look like:

I am using the jQuery Columnizer plugin to automatically split the form into columns in conjunction with some other jQuery to manipulate the form and add some additional DIVs which will make additional styling easier.

I am generally pleased with how it came out.  I am going to play with it a little more before releasing an update but wanted to provide a preview in case anyone had an suggestions or questions.

Huh? How’d I miss WordCamp Raleigh?

I was perusing some WordPress feeds I follow this morning and was reading an article about recent debate on where Custom Post Types should live (plugin or theme – for the record, I am on the side that CPTs should reside in a plugin for the same reasons the article points out) on wpBeginner.com when I saw a mention that the debate originated at WordCamp Raleigh.

A WordCamp here in Raleigh?  How did I miss that?  Unlike many weekends where I am out an about with soccer, basketball, lacrosse or the like, I was around this weekend.  I couldn’t have gone to the whole thing but the venue for WordCamp Raleigh is maybe 15 minutes from my house.

Bummer – I really would have liked to have attended a couple of the sessions, in particular Using AJAX in your Plugins, Using Git with WordPress and a couple of others.

Maybe next year …

WordPress Google Form v0.45 now available

This afternoon I released v0.45 of my WordPress Google Form plugin.  After validating the changes I made in the beta with a user who was dealing with a polluted jQuery script, it looks like moving the jQuery script into the WordPress footer action is the right answer.

You can find the update in the WordPress Plugin Repository or as an update on your WordPress Dashboard.

WordPress Google Form v0.45-beta available

I’ve made a subtle but potentially significant change to WordPress Google Form that I am looking for some people to try out.  The plugin generates a jQuery script on the fly to perform a number of actions depending on the shortcode attributes present and their setting.

Historically the jQuery script has been output as part of the form code but I’ve seen a number of cases lately where another plugin or in some cases, the theme, is manipulating the page content which ends up affecting the jQuery script.

In one case I looked at this weekend something, I am still not sure what, is injecting paragraph elements into the HTML after it detects a closing DIV tag.  For the most part this isn’t a big deal except, there are closing DIV tags in the jQuery script as part of the CAPTCHA functionality.  The CAPTCHA functionality injects a DIV which holds a second DIV and some other input elements and labels.  What ever is injecting the P elements into the HTML after every closing DIV is causing my script to have syntax errors when the page loads.

To solve this problem I have moved to loading of the jQuery script into the WordPress footer action.  In my testing making this change  has zero effect on the functionality but I’d like some other people to test it and provide me feedback.

Google Forms Beta (9293 downloads )

WordPress Google Form v0.44 now available

This morning I released v0.44 of WordPress Google Form.  This is a minor update which addresses a problem reported in the WordPress Plugin Support Forum.  This update fixes the problem where the settings which are on by default, cannot be turned off.  You can find the update in the WordPress Plugin Repository or as an update on your WordPress Dashboard.

WordPress Google Form v0.43 now available

This evening I released v0.43 of my WordPress Google Form plugin.  This update addresses a couple of bugs and fixes a few more issues with the optional CSS prefix.  It also addresses a potentially serious problem when using Debug Mode with PHP version prior to 5.3.

  • Reimplemented shortcode attribute br=’on’ usinq jQuery instead of preg_replace().
  • Reimplemented shortcode attribute legal=’off’ usinq jQuery instead of preg_replace().
  • Fixed DEBUG mode so it will work with PHP 5.2 (which doesn’t support anonymous functions).
  • Fixed CSS prefix bugs which prevented CSS prefix from being applied to all Google CSS classes.

WordPress Google Form v0.42 now available

This morning I released v0.42 of my WordPress Google Form plugin. This version fixes a number of minor bugs, one major bug, and adds some new functionality. Of particular note is the ability to add a CAPTCHA to your Google Form to help reduce SPAM form submissions.

  • Added simple math based CAPTCHA support.
  • Reintroduced jQuery Validation for checking required fields.
  • Improved support for multiple forms on one page.
  • Fixed several bugs where CSS prefix, when used, was not output in some places.
  • Moved Debug control to its own tab on the settings page.
  • Added new Debug options to facilitate chasing down HTTP API issues.
  • Fixed bug where the CSS prefix, when used, was not being applied properly to elements which had more than one class. Only the first class was properly prefixed.

You can find the update in the WordPress Plugin Repository or as an Update on your WordPress Dashboard.