Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » Event Registration for Event Calendar

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 468 Views
  • Mejoo
    Avatar
    Community Member
    3 Posts

    Event Registration for Event Calendar Link to this post

    Hi everyone

    I have looked at the unclecheese tutorial " Thanks unclecheese for your tutorial" at the following link:
    http://www.leftandmain.com/silverstripe-tutorials/2010/08/26/creating-an-event-registration-form-for-event-calendar/

    And I was able to build Registration system for Trips. However, I tried to move the Registration tap to be on the event "Trips" instead of the TripsHolder. But I am facing some problem with, registrationLink I think!

    Here what I have change from unclecheese approach:

    I moved all the functions from the TripHolder “ConferenceHolder” Controller to Trip “Conference” Controller.

    And to get the Registration for the current Trip I did:

    public function getCMSFields() {
    $f = parent::getCMSFields();
    $f->addFieldToTab(‘Root.Content.Main’, new TextField(‘Location’,_t(‘Trip.LOCATION’,'The Trip Location’)), ‘Content’);
    $f->addFieldToTab(“Root.Content.Main”, new CurrencyField(‘Cost’,_t(‘Trip.COST’,'Trip Cost’)),’Content’);

    $f->addFieldToTab(“Root.Content.Registration”, new DataObjectManager(
    $this,
    ‘Registration’,
    ‘TripRegistration’,
    array(
    ‘Name’ => ‘Name’,
    ‘Email’ => ‘Email’,
    ‘Mobile’ => ‘Mobile’
    ),’getCMSfields_forPopup’,
    “‘TripID’ = ‘{$this->ID}’”
    ));
    return $f;
    }

    But it seems there is something wrong. I’m not getting the right registration link:

    I change RegisterLink function to:

    public function RegisterLink() {
    return $this->Trip()->Link(“register”).”?DateID=$this->ID”;
    }

    Please Please Please Help me with that.

    468 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.