Shortcodes for Use in the Form Template

This is an update on the shortcodes available for customizing your RSVP form. These are not normally used in the body of the post as they are below but in the form template you can establish on a global basis in the settings screen and customize on a per event basis.

Updates: See also this update, detailing the more visual form generator now available.)

As of version 3.7, you can specify that a field should be repeated on the guest section of the form by adding the guestfield=”1″ attribute.

[rsvpfield radio=”meal” sep=” ” options=”Steak,Chicken,Vegetarian” checked=”Steak” guestfield=”1″ ]

Option to customize the RSVP form for a specific post.
Option to customize the RSVP form for a specific post.

The default form is laid out in a table, but you’re welcome to use another formatting scheme that fits with the theme for your site.

I’ve gotten some requests to support additional common HTML codes, so checkboxes and radio buttons have been added.

Sample Custom Fields

For example if I want to add the following input fields …

Nickname for badge:

I will volunteer to help with setup and cleanup.

Food choice:

Drink choice:
beer wine soda

… I would specify them in the editor like this (bold added for emphasis).

Here are the controls and how they work.

Text Field

Shortcode:

[rsvpfield textfield="text-test" size="60"]

HTML:
<input  class="text-test" type="text" name="profile[text-test]" id="text-test"  size="60"  value=""  />
Profile:
array (
  'nickname' => '',
  'volunteer' => '',
  'food' => '',
  'drink' => '',
  'text-test' => '',
)
Display:

Text Field, Required

Shortcode:

[rsvpfield textfield="text-test" size="60" required="1"]

HTML:
<span class="required"><input  class="text-test" type="text" name="profile[text-test]" id="text-test"  size="60"  value=""  /></span>
Profile:
array (
  'nickname' => '',
  'volunteer' => '',
  'food' => '',
  'drink' => '',
  'text-test' => '',
)
Display:

Select Field

Shortcode:

[rsvpfield selectfield="select-test" options="one,two,three,four"]

HTML:
<span  class="select-test"><select class="select-test" name="profile[select-test]" id="select-test" >
<option value="one" >one</option>
<option value="two" >two</option>
<option value="three" >three</option>
<option value="four" >four</option>
</select></span>
Profile:
array (
  'nickname' => '',
  'volunteer' => '',
  'food' => '',
  'drink' => '',
  'text-test' => '',
  'select-test' => '',
)
Display:

Select Field with Default Selection

Shortcode:

[rsvpfield selectfield="select-test" options="one,two,three,four" selected="three"]

HTML:
<span  class="select-test"><select class="select-test" name="profile[select-test]" id="select-test" >
<option value="one" >one</option>
<option value="two" >two</option>
<option value="three"  selected="selected" >three</option>
<option value="four" >four</option>
</select></span>
Profile:
array (
  'nickname' => '',
  'volunteer' => '',
  'food' => '',
  'drink' => '',
  'text-test' => '',
  'select-test' => '',
)
Display:

Checkbox, checked by default

Shortcode:

[rsvpfield checkbox="checkboxtest" value="1" checked="1"]

HTML:
<input class="checkboxtest" type="checkbox" name="profile[checkboxtest]" id="checkboxtest" value="1"  checked="checked" />
Profile:
array (
  'nickname' => '',
  'volunteer' => '',
  'food' => '',
  'drink' => '',
  'text-test' => '',
  'select-test' => '',
  'checkboxtest' => '',
)
Display:

Radio buttons, separated by line break (default)

Shortcode:

[rsvpfield radio="radiotest" options="one,two,three,four" checked="two"]

HTML:
<span  class="radiotest"><input class="radiotest" type="radio" name="profile[radiotest]" id="radiotestone" class="radiotest"  value="one"  /> one</span>  <span  class="radiotest"><input class="radiotest" type="radio" name="profile[radiotest]" id="radiotesttwo" class="radiotest"  value="two"  /> two</span>  <span  class="radiotest"><input class="radiotest" type="radio" name="profile[radiotest]" id="radiotestthree" class="radiotest"  value="three"  /> three</span>  <span  class="radiotest"><input class="radiotest" type="radio" name="profile[radiotest]" id="radiotestfour" class="radiotest"  value="four"  /> four</span> 
Profile:
array (
  'nickname' => '',
  'volunteer' => '',
  'food' => '',
  'drink' => '',
  'text-test' => '',
  'select-test' => '',
  'checkboxtest' => '',
  'radiotest' => '',
)
Display:

one two three four

Radio buttons, separated by a space

Shortcode:

[rsvpfield radio="radiotest2" options="one,two,three,four" checked="two" sep=" "]

HTML:
<span  class="radiotest2"><input class="radiotest2" type="radio" name="profile[radiotest2]" id="radiotest2one" class="radiotest2"  value="one"  /> one</span>  <span  class="radiotest2"><input class="radiotest2" type="radio" name="profile[radiotest2]" id="radiotest2two" class="radiotest2"  value="two"  /> two</span>  <span  class="radiotest2"><input class="radiotest2" type="radio" name="profile[radiotest2]" id="radiotest2three" class="radiotest2"  value="three"  /> three</span>  <span  class="radiotest2"><input class="radiotest2" type="radio" name="profile[radiotest2]" id="radiotest2four" class="radiotest2"  value="four"  /> four</span> 
Profile:
array (
  'nickname' => '',
  'volunteer' => '',
  'food' => '',
  'drink' => '',
  'text-test' => '',
  'select-test' => '',
  'checkboxtest' => '',
  'radiotest' => '',
  'radiotest2' => '',
)
Display:

one two three four

10 thoughts on “Shortcodes for Use in the Form Template”

  1. I want to add an additional response beneath the radio button selection that is checked to RSVP, but I am having trouble getting the radio buttons to appear on the same line. I added the following text and shortcode as the first line in the RSVP form box:

    Riding Church Van?[rsvpfield radio="Riding Church Van?" options="No,Yes" checked="No" sep=" "]

    The second radio button drops down to the next line for some reason.

    This is the link to the RSVP event form:
    http://whchurchofchrist.org/rsvpmaker/ladies-day-at-the-arboretum-2014-6-14/
    Thanks.

    1. You want people who RSVP for an event to be able to upload a file or video as part of the form? I don’t have a way of handling that yet, although it’s a customization I could add on contract if it’s important to you.

      If you just want a video or a link to a file to be displayed as part of the event description, that works the same way it would for any other post.

  2. I am using the WP plugin Ultimate Member for my members/login only site. With RSVPMaker filling out default field values in the event forms works fine with first, last and email profile data, but what if I want to use other profile data, like zip code, address etc – taken from the ultimate member plugin.. Tried using the metakey used with UM in the rsvpfield but (of course :-)) it does not work out of the box. Any solutions to this?

  3. Is there a way to remove the “Add More Guests” link? I am trying to set up an event where only one guest (in addition to themselves) is allowed, and I don’t want them to enter more than one additional name.

    1. The easiest way to handle that would be to omit the standard module for a grow-able list of blanks for guests and instead include a field on the primary guest form. So you would create a field called Guest Name or a couple of fields Guest First Name, Guest Last Name.

Leave a Reply