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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   1631 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