Using RSVPMaker on Membership Websites

Version 3.9.7 adds better functionality for membership websites, where the people entering RSVPs have user accounts and log in prior to responding.

  • The system will now automatically look up any previous RSVPs associated with the same account (which for unauthenticated users only happens if they click the update link in a confirmation email).
  • Form fields will be filled in based on user metadata, provided that the form field names match the usermeta fields. Example: a membership site records the user’s work number as work_phone, and the form field is also labeled work_phone, so the work phone number on the user’s profile is filled in by default on the RSVP form.

Here is an illustration of that last point:

Adding the Work Phone field in the form generator.
Adding the Work Phone field in the form generator.
The generated code for the form, with Work Code as the label displayed to the user but work_code as the field ID.
The generated code for the form, with Work Phone as the label displayed to the user but work_phone as the ID for a text field.
The work phone number is filled in by default on the form.
The work phone number is filled in by default on the form.

The RSVPMaker form generator is a simple utility that does not address all possible variations. One that would require manual coding is to make a field containing profile data a hidden field rather than a user editable one. For example, a hockey league that contacted me with the request for this feature has a custom profile label for “Team,” which is a value they might not want users to be able to alter on an event-by-event basis. Or you simply might not want to display information including name and email address that is already in the user profile table.

To make the form fields hidden instead of editable, we would manually change the form code “textfield” to “hidden” as in this example:

<p class=”work_phone”><label>Work Phone</label> [rsvpfield textfield=”work_phone” ]</p>

Becomes:

[rsvpfield hidden=”work_phone” ]

Whether this will work with your membership plugin of choice depends on how it handles custom profile data. So far, I’ve tested it with my own RSVPMaker for Toastmasters plugin as well as the Ultimate Member plugin (which is used by the hockey league I mentioned). You can also program your own user profile fields by creating your own plugin or custom theme (with the code added to functions.php). For RSVPMaker to retrieve custom profile data, it must be recorded as standard WordPress user metadata, which is recorded in the database table typically named wp_usermeta (some sites may change the prefix to something other to wp_). The user metadata field names must also follow the convention of being all in lowercase with an underscore in the place of any letters or punctuation, which is the same way the RSVPMaker form generator formats field names based on the label text.

Video: Simplified PayPal Setup, Plus Payment Process and RSVP Form Improvements

As part of my preparation for a webinar on RSVPMaker, I have been working on satisfying some longstanding requests from users of the plugin to simplify the PayPal setup and the setup of the RSVP form itself. These improvements are in version 3.7, just released.

Just the other week, I heard from a wedding planner who wanted to prompt users for a meal choice for themselves and any guests — and including those choices for guests was not something RSVPMaker handled well until now.

Another bit of motivation is related to my WordPress for Toastmasters project, which is based on extensions to RSVPMaker. It used to be that enabling PayPal support required manually editing and uploading a configuration file. But now I’m hosting sites on behalf of Toastmasters clubs in a WordPress multisite setup where it wouldn’t be practical for those who want to add PayPal support FTP access. So I’ve provided a little PayPal Setup wizard on the RSVPMaker settings screen to streamline the process.

Note on Security

The reason I didn’t simplify PayPal setup before now is justified paranoia: I didn’t want to be responsible for someone getting unauthorized access to your PayPal account. I still don’t. This is why I don’t store your PayPal credentials in the WordPress database. From time to time, WordPress has been known to be hacked.

While nothing is completely secure, the file system is a little more secure than the database — if an attacker has FTP access to your site, you’re already in big trouble. The PHP file containing your user credentials is set up to prevent someone from browsing to it and viewing the contents. By giving it a random filename, rather than calling it “paypal_constants.php,” I also make it less likely that an attacker will find it in the first place.

If you do have FTP access to your site, one thing you may want to do for extra security is move the file to a location outside of web root. For example, instead of storing it in /home/rsvpmaker/public-html/wp-content/uploads/2016/02/stringofjibberish.php I might put it above the public-html directory in /home/rsvpmaker/.

If you prefer to create the configuration file manually, a sample is available here:
https://rsvpmaker.com/paypal_constants.txt.

Timed Display of Content: the rsvpmaker_timed Shortcode

Part of the point of using a calendar plugin on your blog is to have content displayed for upcoming events, but not past ones, or at least give the upcoming events people can sign up for or attend greater emphasis and display them in chronological order (rather than the reverse chronological order of a blog listing).

I always think it looks stupid for a website to be promoting an event that is already past. Computers can tell time, and we should let them do so on our behalf rather than waiting for the webmaster to get around to removing the outdated content.

Events aren’t the only example of time-sensitive content, however. We may have limited time offers or other content that has a start date, an end date, or both. WordPress lets you schedule posts to go live at a given time in the future, but what if you want to embed a bit of limited time content on your home page or somewhere else on your site?

That’s the purpose of the rsvpmaker_timed shortcode, which can be wrapped around any bit of content in a page or a post that should only be displayed after a given time, until a given time, or between a start time and an end time. For those not familiar, a shortcode is a code you enter into the WordPress editor that achieves a special effect. Here is an example:

rsvpmaker_timed coding wrapped around a paragraph for conditional display.
rsvpmaker_timed coding wrapped around a paragraph for conditional display.

This shows the shortcode open and close tags wrapped around a paragraph, but it could just as easily be a longer block of content including images or video.

The shortcode attributes are start, end, too_early, and too_late. Put a plain language date like ‘January 1, 2016 7 pm’ in the start and/or end fields, or use a database style date like ‘2016-01-20 19:00′ and RSVPMaker will test the current time against those rules.

If a visitor is coming too the site too early or too late, according to those rules, the shortcode will return either an empty string or the contents of the too_early / too_late parameters, if set. Otherwise, the content will be returned as it normally would be.

Note that if a time is not specified, in addition to the date, the time is considered to be “00:00:00″ — first thing in the very early morning of that date. So if what you really want is to specify a cutoff at midnight, you should either put in ’11:59 pm’ or ’23:59:59′ as the end time. Alternatively, if you want content to stop being shown after January 29 is over, you could set end=”January 30, 2016”

In the context of my recent projects using Google Hangouts on Air as a webinar platform, one of the ways I am using this is to put a promotion on a website home page until the event occurs. I can provide another block of content to be displayed after the event, directing people to the replay.

Support for this shortcode was added in release 3.6.2.

Extending RSVPMaker – WordPress for Toastmasters

One of my recent side projects has been updating a series of customizations I made to RSVPMaker for use by my Toastmasters club. Toastmasters International is a nonprofit organization that teaches public speaking and leadership skills, and I’m a past club officer and current Area Governor (working with several local clubs).

If you’re reading this in mid-October 2014, consider signing into my tutorial webinar.

#Toastmasters webinar: New Web Tools For High-Performance Clubs, Weds 10/15/2014 at 7 pm ET Register: http://www.anymeeting.com/PIID=EB50D785894831

This may or may not develop into code I release as a plugin — for now, I’m trying my hand at the software as a service business model over at wp4toastmasters.com.

Possibly some aspects of this work could find their way back into RSVPMaker if you see additional uses for certain features. Instead of collecting RSVPs, the thing we want to accomplish with Toastmasters meetings is to sign people up for specific roles. Since this is a membership organization, people log in and identify themselves rather than typing in their names etc. Recently, I’ve been exploring ways of turning the data gathered through using the system into reports to help club officers guide their members through the educational program. You can see a bit of how it works in the video below.

RSVPMaker 2.5 and new method for customizing the RSVP Form

RSVPMaker 2.5 is out and introduces a new method for customizing the RSVP form. It also fixes some glitches with the recurring event setting function and the JavaScript on the RSVP form. (See also setting required fields, updated list of shortcodes).

Form Customization

I’ve received many requests from people who wanted to make more customizations than I allowed for with the built-in administrative tools. For example, some people did not want to include the section that asks for the names of guests. Previously, the only alternative I offered was code-level customization (I tried to add flexibility with a technique for adding a rsvpmaker-custom.php file). NOTE: If you previously customized the form, this release may break your customizations.

I ran into my own requirement for customization recently when I used the form for a luncheon where people were supposed to choose from among 3 meal choices. So the form needed to be different for that one event. It’s now possible to create a custom form for a single event, in addition to the default RSVP Form for the site.

There is now an RSVP Form field that appears on the main RSVPMaker settings screen, as well as the RSVP options panel on the event editing screen.

The default code for the body of the form looks like this:

You can now modify the HTML structure around the form fields as much as you would like. It is important that you include the fields first, last, and email for your form to function properly. But you can add any other fields you might like.

With the exception of the notes textarea, fields are represented by the shortcodes [rsvpfield textfield=”fieldname”] or [rsvpfield selectfield=”fieldname” options=”option1,option2″]. For my luncheon scenario, I could have done something like [rsvpfield selectfield=”meal” options=”Chicken,Salmon,Vegetarian Plate”]

There is also a [rsvpprofiletable show_if_empty=”phone”] shortcode which is an optional block that will not be displayed if the specified data (such as a phone number) is already “on file” from a prior RSVP. For this to work, there must also be a [/rsvpprofiletable] closing tag.

The guest section of the form is represented by [rsvpguests] (no parameters). If you don’t want the guest blanks to show up, you can remove this.

The form code you supply will be wrapped in a form tag with the CSS ID of “rsvpform”.  The yes/no radio buttons and certain other fields that are generated from code for PayPal payments or timeslot reservations are still outside the bounds of what you can customize with this method.

I hope most users will find this to be an improvement.

Update Nov. 2013: The rsvpfield shortcode now also supports checkbox=”fieldname” and radio=”fieldname” parameters as an alternative to textfield and select. Checkbox must be used in combination with value=”somevaluehere” to specify what value should be submitted if the checkbox is checked. See the updated list of shortcodes.

The radio parameter works similarly to select, where you specify options=”option1,option2,option3″ – one additional option you can use here is sep=”<br />” to include a line break between radio button options. Line break is actually the default, but in the example above I used sep=” ” to put a space between the radio buttons. I could also do two spaces as sep=”&nbps;&nbps;” or wrap a <div> tag around the whole thing and use sep=”</div><div>” to make each choice appear in a separate div.

Video: PayPal Setup for Event Payments with RSVPMaker

This tutorial shows how to integrate PayPal with RSVPMaker so you can collect a fee for admission or other fees associated with an event.

The PayPal configuration seems to be the part of RSVPMaker setup people have the most trouble with, and the directions are a little tricky. I hope this will help.

Because there’s money involved, I’ve tried to be careful to make this as secure as I know how, following the guidelines from PayPal. That’s the reason I make you jump through a few extra hoops, creating a file in a secure location on the server to contain the PayPal parameters, rather than simply providing a configuration screen in WordPress. You don’t want someone using the API access to get into your PayPal account (and potentially your bank account), so it’s worth taking a little more time to do it right.