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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

Event Calendar Registration Link


Go to End


4 Posts   1510 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, 4102 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, 4102 Posts

27 August 2010 at 8:49am