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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Event Calendar - Filter by DB field in extended CalendarDateTime


Go to End


1078 Views

Avatar
Nobrainer Web

Community Member, 138 Posts

9 September 2010 at 10:18pm

Hello,

I'm trying to setup the Event calendar module suit my needs, so far it works very well.
Have followed the tutorial http://doc.silverstripe.org/recipes:extending_the_event_calendar?s=recipes%252520calendar#overview
(One thing though - in the section Modifying the Table field, i think the following code is missing: $this->addPopupFields(array(new TextField('Location'))); or am i missing something?)

I have added 2 custom db fields (City, Location as Varchar) to CourseDateTime, my extension of CalendarDateTime.
http://pastie.org/1147745

I now need to add a filter option for these two fields, preferably as dropdown.
How can this be done?

Code
My CourseHolder: http://pastie.org/1147750
My Course: http://pastie.org/1147752