Filter Schedule Display in Day View

Hi, we used to have scheduler for Wordpress and it was great. One option that was implemented along the way was to filter the display of staff bookings in day view so the work sheets could be printed out for each staff member.

Some of the code that was used included:
in DHTLMXSchedulerConfigurator.php

$scheduler .= " scheduler._filter_by = ''; scheduler.filter_day = scheduler.filter_week = scheduler.filter_month = function(id){ if (!scheduler._filter_by) return true; if (scheduler.getEvent(id).staff == scheduler._filter_by) return true; return false; };

And a drop down selector:

<div class="select_filter"> <select onchange='scheduler._filter_by = this.value;scheduler.setCurrentView(scheduler._date);'> <option value='staff_0'>Colin</option> <option value='staff_1'>Mike</option> <option value='staff_2'>Gary</option> <option value='staff_3'>Hayden</option> <option value='staff_4'>Glenn</option> </select>

But I can’t convert that to the files in front of me. Can you help please?

Many thanks!

So I’m bashing my had against a wall for days now trying to get this sorted.
The following is what I have - but which doesn’t work properly (yet):

scheduler.filter_day = scheduler.filter_week = scheduler.filter_month = function(id,events) { if (!scheduler._filter_by) return true; if (scheduler.getEvent(id).section == scheduler._filter_by) return true; return false; };

And:

<select onchange='scheduler._filter_by = this.value;scheduler.setCurrentView(scheduler._date);'> <option value=''>Select</option> <option value='0'>Jim</option> <option value='1'>Brad</option> <option value='2'>Glenn</option> <option value='3'>Hayden</option> <option value='4'>Jo</option> <option value='5'>Dennis</option> </select>

This is my database info:

code
(“types”,“typeid”,“typeid(value),name(label)”)[/code]

I’ve made some progress - the drop down selecter works in day view BUT all events are bundled into the one “section” column of my schedule in units view.

I’ve tried so many variations.

I’ve read the docs on filtering, I’ve searched (extensively) this forum and Stack Overflow … and googled, but it just makes me grey now. :laughing:

Please, can anyone help?

Fixed now - after changing the name of a db column I forgot to update some of the values in the files … my code above works as it should. :unamused: