While ICS Events does not include built-in registration form capabilities, version 5.9.2 introduces an easy method for integrating with any WordPress form plugin that allows you to pass data into form fields via query string variables.
Currently this feature is only available on single-instance events, not recurring events. This is due to complications with recurrence rule calculations, and ensuring that the correct date and time are associated with the link. Recurring events will be supported in a future update.
We recommend using Gravity Forms or Ninja Forms, both of which have easy-to-use, well-documented methods for inserting query string data into forms.
Other form plugins should work as well, as long as they support pre-filling inputs from query string variables.
If you haven’t used a form plugin before, please be aware that there are sometimes complications around using forms with WordPress, such as email delivery problems or spam/bot submissions. Most popular form plugins have mechanisms in place to deal with these issues.
Please consult the documentation for your selected form plugin to make sure you’re taking all of the appropriate set-up steps. We are offering this integration feature as a convenience, but we cannot provide technical support for plugins created by other developers.
Step 1: Create your registration form
This step will be completed using the third-party form creation plugin of your choice.
You can set up as many registration forms as you like, but for ease of use, we recommend setting up a single registration form, containing all of the fields you typically need to collect. If you have some free events and some paid events, you may need to set up separate forms.
Step 2: Add a hidden field to your form
This step will be completed using the third-party form creation plugin of your choice.
In your registration form, create a new field — we recommend making it a hidden field, but your needs may vary. You’ll be configuring this field to receive its default value from the icsevent
query string variable. Plugin-specific instructions are below.
What’s a hidden field? A hidden field is contained in a web form but is not displayed at all to the user. However, the data contained in the field is included along with the user-entered data when the form is submitted. It is not hidden to you when you receive the submission.
Does this have to be a hidden field? No! If you would like the information to be visible to the user on the event registration page, you can make it a regular text field instead. We recommend making the field read-only, if the plugin supports that capability, so the user doesn’t inadvertently change the content of the field.
For Gravity Forms
- Under Standard Fields in the right sidebar, click Hidden.
- Click on the new hidden field in your form to access its settings. Under General, set Field Label to “ICS Event” or another descriptive name of your choice.
- Under Advanced, leave Default Value blank. Click Allow field to be populated dynamically and in the Parameter Name box, enter:
icsevent
- Save the form.
For Ninja Forms
- At the top of the page, click Add new field. In the sidebar that appears, under Miscellaneous Fields, click Hidden.
- Click on the new hidden field in your form to access its settings. Set Label to “ICS Event” or another descriptive name of your choice.
- For Default Value, enter:
{querystring:icsevent}
- Save the form.
Step 3: Add your form to a page
Most form plugins do not create standalone pages on your site to display the form. Instead, they use custom blocks or shortcodes to insert the form into your other pages or posts wherever you specify. Follow the plugin’s instructions for inserting the form into a new page called “Event Registration” or something similar.
Once this page is published, copy its URL to your clipboard.
Step 4: Add the registration link to your ICS Event
In WordPress admin, under ICS Events, locate the event you wish to edit.
On the event editing screen, click the Event Details tab.
Paste the URL from your clipboard into the Event/Registration URL field. When you do this, a new field called Append icsevent
query string to Event/Registration URL? will appear. By default, nothing will be appended to the event URL. You can choose “event ID only” to pass in only the event ID*, or “event title, date and time” to pass more complete and descriptive event info into the hidden field.
Now, when the event appears in your calendar, its URL will include the icsevent
query string along with the specified event details. When a user clicks the link, they’ll be taken to the registration form with the event info pre-filled in the hidden field, which will be available to you when you receive their form submission.
You’ll only need to complete steps 1 to 3 once. From that point, you can use the same form for additional events in the future. Just paste the same form page URL into the Event/Registration URL field when creating new events, and select which option you wish to use to append the query string.
*Passing only the event ID is mainly useful if you will be writing custom code to match event registrations to the event. It will also be useful for integrations we are planning in a future update.