I have a TreeDropdownField working exactly as I need it to, however I'd ideally like to disable checkboxes for all pages in the tree except for those which have the ServicePage class.
Here is my code:
$fields->addFieldToTab(
'Root.Services',
new TreeMultiselectField(
'Services',
'Related services',
'SiteTree'
)
);
Looked at the code suggested at the bottom of http://stackoverflow.com/questions/29171542/filter-sitetree-treedropdownfield-in-silverstripe-3-1 but not quite sure how to integrate this into the above. Can someone please advise.