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:
<table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td>First Name:</td><td>[rsvpfield textfield="first" required="1"]</td> </tr> <tr> <td>Last Name:</td><td>[rsvpfield textfield="last" required="1"]</td> </tr> <tr> <td width="100">Email:</td><td>[rsvpfield textfield="email" required="1"]</td> </tr> </table> [rsvpprofiletable show_if_empty="phone"] <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="100">Phone:</td> <td>[rsvpfield textfield="phone" size="20"]</td> </tr> <tr> <td>Phone Type:</td> <td>[rsvpfield selectfield="phonetype" options="Work Phone,Mobile Phone,Home Phone"]</td> </tr> </table> [/rsvpprofiletable] <p>Table Size: [rsvpfield radio="tablesize" options="regular,large,double" sep=" "]</p> <p>[rsvpfield checkbox="booksigning" value="yes"] Attend Book Signing</p> [rsvpguests] <p>Note:<br /> <textarea name="note" cols="60" rows="2" id="note"></textarea> </p>
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.
Is it possible to display custom fields when displaying attendees? If so, how could this be done.
Tell me what you have in mind, and I’ll be able to give more hints. It might be something I can build into a near-future release.
I am a member of a Snowmobile club, and I added a custom field to enter the name of a person you will be sharing a room while attending a club event. What I would like to show is the person’s name who rsvp’d, and also the name entered in the custom field for the roommate in place of the of the notes field.
(i.e RSVP User / rooomate) or something like that.
Is that possible?
Do I understand right you want this to show up publicly, so everyone can see who has signed up and whom they’ve chosen for a roommate?
Yes, that is correct. This way people interested in signing up will know if there is someone available to share room cost with or need to get a place on there own,
Maybe I need a more flexible way of handling this, but here’s what I can suggest for your immediate need.
If you follow the directions on this site for creating an rsvpmaker-custom.php file, you should be able to paste in code to override the built in function for retrieving guest details.
See http://www.rsvpmaker.com/2010/12/changing-the-rsvp-form-other-customizations/Your custom function would look something like this:
function ajax_guest_lookup() {
if(!isset($_GET[“ajax_guest_lookup”])) return;
$event = $_GET[“ajax_guest_lookup”];
global $wpdb;
$sql = “SELECT first,last,note FROM “.$wpdb->prefix.”rsvpmaker WHERE event=$event AND yesno=1 ORDER BY id DESC”;
$attendees = $wpdb->get_results($sql);echo ”;
foreach($attendees as $row)
{?>
first;?> last;?>
details)
{
$detailsarray = unserialize($row->details);
if($detailsarray[“roommate”]) {
$roommate = htmlentities(strip_tags($detailsarray[“roommate”]));
echo “<p>Roommate: $roommate</p>”;
}
}
if($row->note);
echo wpautop($row->note);
}
echo ”;
exit();
}
Some of this came out garbled, so see the version posted here:
http://rsvpmaker.com/2012/07/customizing-the-show-attendees-function/
Thank You David, do I put this code in the rsvp-pluggable file or rsvp-custom file?
The way it works is that rsvpmaker checks for the existence of an rsvpmaker-custom.php file in wp-content/plugins (the directory above wp-content/plugins/rsvpmaker). Any functions included in that file will override functions in rsvpmaker-pluggable.php that have the same name. In this case, you’re overriding ajax_guest_lookup()
You wouldn’t want to modify rsvpmaker-pluggable.php because your changes would be overwritten the next time you updated the plugin.
Okay, Created the rsvp_custom.php, added to the plug-ins directory as explained, still to not see the roommate field. Is there anything I am missing?
The filename should be rsvpmaker-custom.php
Make sure you midify the sample code I provided to match the custom field in your RSVP form.
If you specified your custom filed as [rsvpfield textfield="xfield"] then you’d be looking for $detailsarray[“xfield”] where I had $detailsarray[“roommate”]
Okay, I have rsvpmaker-custom.php, code entered as menitoned. I have checked the field name in the rsvp form which matches the field names in the custom file. Still am not seeing the roommate field in the attendee list. What else could I check?
Therewas an error in thesample code I provided. SQL should be SELECT * to fetch all fields.
David, Do you know if this would be possible to do?
When I remove [rsvpguests] from the code I get a bunch of errors.
Warning: Invalid argument supplied for foreach() in /homepages/32/d399957389/htdocs/uscnewcomers/wp-content/plugins/rsvpmaker/rsvpmaker-plugabble.php on line 276Warning: Invalid argument supplied for foreach() in /homepages/32/d399957389/htdocs/uscnewcomers/wp-content/plugins/rsvpmaker/rsvpmaker-plugabble.php on line 328Warning: Cannot modify header information – headers already sent by (output started at /homepages/32/d399957389/htdocs/uscnewcomers/wp-content/plugins/rsvpmaker/rsvpmaker-plugabble.php:276) in/homepages/32/d399957389/htdocs/uscnewcomers/wp-content/plugins/rsvpmaker/rsvpmaker-plugabble.php on line 354
Any thoughts on what I might be doing wrong? I just want to remove the guest section. Actually I want to just have First Name, Last Name, Email, and Notes. No Phone Number or Guest Section, but when I remove those, I get errors.
My husband looked at the code in rsvpmaker-plugabble.php and there were two places that had a
foreach($_POST[“guestfirst”] as $first)
that was causing the issue (line 276 and 328) when [rsvpguests] was removed from the event page. He put a
if( isset($_POST[“guestfirst”]) && is_array($_POST[“guestfirst”]) )
around each foreach loop and that fixed the issue.
Thanks for sharing this. I’ll get this into a bugfix release.
This fix is incorporated in release 2.5.4
How do I remove the Yes and No button options?
You don’t have to enable RSVPs for every event.
Or do you mean you want to collect responses but just assume that if they’re responding it’s a yes? You’d have to override the event_content($content) filter function in rsvpmaker-plugabble.php (see advanced customization documentation)
Hey David,
Is there any way I can make the First name, Last name and Email fields as required fields in the RSVP Form?
If yes, how to achieve that?
Any help would be grateful!
Thanks!
This is coming soon
See this entry http://rsvpmaker.com/2012/08/setting-required-fields-for-the-rsvpmaker-form/
How can I expand the data fields (first name, last name, etc.) so responders can see everything they are typing in? Right now the fields only show 5 or 6 characters.
Sounds like there is something in the CSS for your theme that is setting the width on input elements to be very narrow
You should be able to modify your css with something like this:
#rsvpform input[type=text] {
width: 80px;
}
Anyone know where I would dig in to add a function that makes sure the email being submitted doesn’t exist?
Hi – the plugin is great, but I’m having some trouble customizing. I’d like to remove the phone number field. I did this in the RSVP form in the admin, and then took out instances in the PHP files. The phone field stills appears, however.
Hi. Great plugin.
Can I include a button or checkbox type fields in the form by editing the RSVP From field?
This will be used by different users. I can spend some time teaching them how to use the shortcodes in the field, but not how to edit a php file.
The latest update lets you specify checkboxes and radio buttons as variations on the rsvpfield shortcode. See note above.
I’m having a devil of a time getting my events to line up with the descriptions. Take a look at this page: http://gotgenealogy.com/gotgenealogy/upcoming-events-please-rsvp-below/ … I want to publish my schedule of events for July (10 events), but based on the three currently showing, I can’t do it. This wasn’t like this a few weeks ago. What has changed?
I’m having a problem with the RSVP functionality. Every time I hit the RSVP on the actual events page I get a 404 error message Something went wrong/Page not found.
I’ve added the rsvpmaker_upcoming shortcode on my events page of course, just dont know if I need to add another shortcode (which one?) somewhere else in my wp…
Any help is MUCH appreciated!
K
Sorry to be slow to respond. This seems to be a problem with certain configurations and not others. I just put out a new release that uses a different wordpress function to generate the permalink to an event page – according to the documentation it may work better. It’s hard to debug because I’ve never seen this particular error on the sites I manage.
When I delete the [rsvpguests] line the submit button vanishes. Is that somehow coded into that functionality?
I tested for this and cannot reproduce the problem. My guess is that you may have made some other change to the form, perhaps to the html content that is causing the submit button to be hidden or aligned improperly so that you’re not seeing it. If you can send me a link to a sample event that has this problem, I might be able to give more specific advice.
Would it be possible to add a captcha or something similar (like “what’s 5+5?”) to the RSVP form, to help stop trolls from adding their info as RSVPs to your event? My website has been getting quite a lot of spam RSVPs lately and I was thinking this might be a really nice feature to add to the basic RSVP form? Please let me know what you think or any suggestions you may have?
I would like to customize the first and last name fields in a different way from the email field. For example, I want to have the email address field twice as long as the first and last name fields so that I can put the first and last name fields on the same line.
I’ve also removed the labels outside the first and last name fields, and I want to add placeholder text inside the fields themselves. Any way I can do this?
Hi there. I’m wondering if it’s possible to change the text that says “RSVP Now!” at the beginning of the RSVP form. I’ve looked through the templates and don’t see any code where it’s possible to change that text. In my case, it will be better to say, “register now”. Thanks!
Solved!
Plugins >> editor >> select “RSVPmaker” in the upper right hand corner >> select “rsvpmaker-plugabble.php” on the right >> change…
to read
Hi, I made a custom RSVP form. Some of the text fields include Icelandic characters witch appear as some signs and strange characters. How do I fix this?
http://skaust.net/rsvpmaker/22-lr/
Hi, I have added some custom fields to the form but when I pull a report on that event’s RSVP, the custom fields do not show up. Am I doing something wrong? I want a drop down where they indicate an RSVP for # of adults and kids for food.
It would help if I could see an example of the code you entered and a link to a sample event that uses it.
The Add more guests link isn’t working, it don’t add more form sections. http://alexandtiffany2015.com/rsvpmaker/rsvp/ How do I get it to work?
I need all my radio button options to appear in the same line, side by side, but no matter what I try (such as the div suggestion above, and adding sep=” ” ) a line break is still inserted and my options appear one above the other. Any suggestions?
Try upgrading to the latest release, 3.3.6, which I believe should fix that display bug.
How can I remove “Posted by Admin on Date” below the RSVP Now! button? I would also like to remove the calendar icons. Lastly, I how do I change the color and text of the RSVP Now! button? Any guidance you would provide is appreciated. Thanks!
You can remove the posted by / date info by adding hideauthor=”1″ to the rsvpmaker_upcoming shortcode: [rsvpmaker_upcoming hideauthor="1"]
Display of the calendar icons is a default that can be changed on the RSVPMaker settings screen. Also from that screen, you can alter the styling of the RSVPMaker button using inline CSS.
Thanks, all worked great except for the [rsvpmaker_upcoming hideauthor="1"] shortcode. I put the code in and am still seeing the author.
Can you send me a link to the page?
It’s all working now. Thanks again, great Plugin!
Never mind, got it!
you got the hide author thing to work?
I love this plugin! I wondered if we could customize the YES and NO text to something we specify? Also where would we add styling code like Background color and Text Color? thanks in advance!
The YES/NO text is not easily customizable. Maybe I’ll change that in a future release.
The styling and text of the RSVP Now! button can be changed with inline css and is accessible through the RSVPMaker options screen. There’s also an option for specifying a different CSS stylesheet to be loaded on pages where event content is displayed.
Thanks for the tips on Styling the Send Button. Is there a similar space to edit the style of the Event Form Page itself? Ideally id like to change the background color of the individual page. Also is it possible to hide or style the Event Title or Date?
You can have a custom stylesheet that gets loaded on all RSVPMaker posts. You’ll need to upload it to your web server and then include the URL in the appropriate spot in the RSVPMaker settings screen. If you need to apply a different style to one particular event post/form, rather than all of them, that’s not currently possible.
To hide the title and the date, you would set
h1.entry-title {display: none}
div.dateblock {display: none}
Curious why you would want to do that, but yes it should be possible.
Hello, I love this RSVP plugin, but I would love to just use the form portion of it. Is there a way to shortcode just the register information so I can place this form within another WP page? I feel like I am limited in how good I can make this page look and some of the information on the “post” page that it appears on is not needed.
You can embed a single event in a page or post. If you use the calendar button in the WordPress editor, there is an option to select a single event
I would just like to know how to change the color of the rsvp button from red and blue
The Rsvpmaker settings screen allows you to change the coding for the button in inline css
Thanks for your help! I have another question: how can you display the RSVP events other than in one column? I have 6 events and they take up a lot of room on the page only being one column and multiple rows. Is there a way to display the events in a smaller block and perhaps side by side so that I have essentially two columns and three rows? Thank you in advance; I truly appreciate the guidance.
2 thoughts: If you have some PHP coding skills, you can create a shortcode of your own to use in place of rsvpmaker_upcoming that outputs the content differently.
Second, you could override the default CSS file included with RSVPMaker (there is a place on the settings screen where you can specify your own stylesheet to be used instead). To divide the events into columns, you could do something like this:
div.rsvpmaker {
width: 45%;
float: left;
padding-left: 5px;
}
Note: I tried the code above on this site and wasn’t entirely happy with the results. But if you’re a better CSS coder than I am, I’d love to see what you do with it. If you want your site to look good on mobile devices, you would want to include some responsive code so the two columns reformat into one on small screens.
Here is the event page from this site in a 2-column layout using the CSS shared above. Some glitches that would have to be fixed include the crowding of images aligned right to text and the More Events link showing up on the side rather than the bottom.
Dear David,
I’m not sure here is the right place to report bugs but I just noticed since last update an issue showed up:
The Additional Guest form is not working properly. I had set the Email field to show up in Guest section and it was working perfectly but now suddenly it has disappeared.
Here is the code I was using for the form:
————————————————————
First Name:* [rsvpfield textfield="first" required="1"]
Last Name:* [rsvpfield textfield="last" required="1"]
Phone: [rsvpfield textfield="Phone" size="20" ]
Account Manager: [rsvpfield selectfield="Account_Manager" options="Select your account manager,Benzi Mathews,Jackie Wong,Kristen Pietrobon/Sami Sawant,Marsha Fingold,Matia Zarghami,Sri Simon,Tony Mifsud,Van Garabet,Don't Know" required="1"]
Email:* [rsvpfield textfield="email" required="1" guestfield="1"]
Company Name: [rsvpfield textfield="Company_Name" required="0" guestfield="1"]
[rsvpguests]
Note:
[rsvpnote]
—————————————————————————————–
By the way your plugin is the best! 🙂
Ben/Mohsen
Thanks for flagging this. I will check into it. On your form, it looks like you have company name as well as email specified as items to show up on the guest form. Is company name showing up but not email?
Hi David,
Thanks for your fast reply!
Sorry, I forgot to mention that! Actually yes, strangely the Company field will show up. and even if I change the label to something else it will change on the original form but it stays the same in Guest section.
Here is our RSVP page also if is help:
http://tools.zaneengroup.com/rsvpmaker/zaneens-night-out-2016-10-13_16/
Thanks a lot,
Ben
I think version 4.2.6, just released, should cure this issue. Let me know.
Hi David,
That’s it, Like water on fire! 🙂
It’s working perfectly!
Thanks a lot,
Keep on the good work!,
Ben