Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Use more than one complextablefields

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

Page: 1
Go to End
Author Topic: 300 Views
  • dataforlife
    Avatar
    Community Member
    10 Posts

    Use more than one complextablefields Link to this post

    Hallo,

    i want to use two or three complexttablefields of one Class with different filters. How can i do this?

    my code is:

    $Member_unchecked = new ComplexTableField(
             $this,
             'Member',
             'Member',
             null,
             null,
             "Member.EventsID = {$this->ID} AND checked = '0' "
          
          );   
          
          $fields->addFieldToTab('Root.Content.Not checked Members', $Member_unchecked);   
          
          
          
          
    $Member_checked= new ComplexTableField(
             $this,
             'Member',
             'Member',
             null,
             null,
             "Member.EventsID = {$this->ID} AND checked= '1'"
          
          );   
          
          $fields->addFieldToTab('Root.Content.Checked Member', $Member_checked);   
          

    But it doesn't work. One of the two tabs is just white. What is wrong?
    Is there perhaps an other way to do what i mean?

    thanks

    300 Views
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.