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.

Form Questions

Filtering TreeMultiSelect Field




30 May 2014 at 8:17am (Last edited: 30 May 2014 8:17am), Community Member, 528 Posts

I'm using a TreeMultiSelctField to manage a $many_many relation. I'm trying to limit TreeMultiselectField to a certain Page class

$treeField = TreeMultiselectField::create("Communities","Communities","Community","ID","Title");

The above code returns the entire site tree and not just 'Commiunity' pages. Bellow is teh code for the realtions

class RMSBlogExtension extends DataExtension {

   private static $many_many = array(
      "Communities" => "Community"

class BlogCommunityExtension extends DataExtension {
   private static $belongs_many_many = array(
      "BlogEntries" => "BlogEntry"


Not sure if the issue is that they're both DataExtentions or if I'm doinf something else wrong