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 - Get Start Date of event for registration form

Go to End



Community Member, 7 Posts

14 February 2011 at 8:16pm

Hey there, I have a site with an old calendar module that I've updated with the Event Calendar module. There is an established booking process that works fine for the client, but I'll be damned if I can get the actual date to pass from the event page to the booking form. All other data is being passed. For example:

$date = date ('d/m/Y', strtotime($event->StartDate));

$fields = new FieldSet(
new LiteralField("Title", '<h2>'.$event->Title . '</h2>' . '$' . $event->TicketCost . ' : ' . $date . ' : ' . $event->Category),

$event->Title shows, as does $event->TicketCost and $event->$Category

Is there a standard StartDate field that can be grabbed from the CalendarEvent or CalendarDateTime class? All I need is the start date of the first date (there will only be one date and time for any given event).

I have a feeling this is a total rookie error, but any help is greatly appreciated!