Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » Filtering TreeMultiSelect Field

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

Page: 1
Go to End
Author Topic: 188 Views
  • zenmonkey
    Community Member
    528 Posts

    Filtering TreeMultiSelect Field Link to this post

    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

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.