Jump to:

10848 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar Registration Link

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1156 Views
  • mathiasmex
    Avatar
    Community Member
    28 Posts

    Event Calendar Registration Link Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar Registration Link Link to this post

    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']);

  • mathiasmex
    Avatar
    Community Member
    28 Posts

    Re: Event Calendar Registration Link Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts
    1156 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.