Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar - Get Start Date of event for registration form

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 800 Views
  • smallstudio
    Community Member
    7 Posts

    Event Calendar - Get Start Date of event for registration form Link to this post

    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!

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.