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.

All other Modules /

Discuss all other Modules here.

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

Event Calendar - Get Start Date of event for registration form


Reply


837 Views

Avatar
smallstudio

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),
....etc

$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!