Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Event Calendar Registration Link


Reply


4 Posts   1258 Views

Avatar
mathiasmex

Community Member, 28 Posts

9 January 2010 at 4:31am

Hi Uncle Cheese,

I'm trying to set up the Registration link, allowing visitors to go from a Workshop to a registration form, which than should have relevant info already included in the input fields.
But nothing happens.
The $RegistrationLink in the CMS reads "registration" (e.g. the name of the form function in forms.php), followed by ?id=917, which is the id shown in the CMS (admin/show/917). Also tried to pass it with $MenuTitle instead of id, even with entire URL, but without success.
Is there any chance to pass the data into the form, when visitors click the registration link ?

Thanks in advance for any help.

mathiasmex

Avatar
UncleCheese

Forum Moderator, 4096 Posts

9 January 2010 at 4:48am

Edited: 09/01/2010 4:49am

The way I would do it is have a RegistrationLink() function on your DateTime class that goes to /your-registration-page/$this->ID

Then on the registration page, your form looks at $this->urlParams['ID'], gets the DateTime object, and passes its value into a given field on the form, e.g.

new DropdownField('RegisteredDate','I am registering for this date', $map_of_dates_associated_with_event, $this->urlParams['ID']);

Avatar
mathiasmex

Community Member, 28 Posts

10 January 2010 at 2:51am

Uncle Cheese,

as always: thanks a lot for your help. It works like a charme, although I had to get first the Workshop and than - with its associated ID - the workshopDateTime class.

Thank you.

mathiasmex

Avatar
UncleCheese

Forum Moderator, 4096 Posts

27 August 2010 at 8:49am

I've posted a tutorial of registration with Event Calendar here: http://www.leftandmain.com/silverstripe-tutorials/2010/08/26/creating-an-event-registration-form-for-event-calendar/