Customizing the Show Attendees Function

There is a checkbox in RSVPMaker that lets you specify that the names of the attendees and any note they entered in the note field should be displayed publicly. This works with a function in rsvpmaker.pluggable.php that you can override using the advanced customization method for modifying the plugin behavior with your own PHP code.

Here’s a sample custom function, created for someone who said he wanted to be able to show the content of a custom RSVP form field, which in this case includes the name of the roommate someone had chosen for a trip.

function ajax_guest_lookup() {
$event = $_GET["ajax_guest_lookup"];
global $wpdb;
$sql = "SELECT * FROM ".$wpdb->prefix."rsvpmaker WHERE event=$event AND yesno=1 ORDER BY id DESC";
$attendees = $wpdb->get_results($sql);
echo '<div class="attendee_list">';
foreach($attendees as $row)
<h3 class="attendee"><?php echo $row->first;?> <?php echo $row->last;?></h3>
$detailsarray = unserialize($row->details);
if($detailsarray["roommate"])  {
$roommate = htmlentities(strip_tags($detailsarray["roommate"]));
echo "<p>Roommate: $roommate</p>";
echo wpautop($row->note);
echo '</div>';

2 thoughts on “Customizing the Show Attendees Function”

    1. You should be able to do multiple email addresses, separated by commas. However, the “from” address on the confirmation an attendee gets will be the first on the list. Another approach would be to have the emails associated with a forwarding address that goes to the list of people coordinating that event.

Leave a Reply