Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » MultiSelectField example

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1136 Views
  • klikhier
    Community Member
    150 Posts

    MultiSelectField example Link to this post

    For an example of how to use the MultiSelectField module:

    static $many_many = array ('Things'=>'ThingPage');

    function getCMSFields() {
    $fields = parent::getCMSFields();
    new MultiSelectField(
    "Things", // Relationship that the field controls
    "Related Things", // Label for field
    "ThingPage", // Related class
    "ID", // Mapped data field in related class (normally ID)
    "Title" // Mapped label field in related class (often Title)
    return $fields;

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.