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.

All other Modules /

Discuss all other Modules here.

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

MultiSelectField example

Go to End



Community Member, 150 Posts

25 June 2009 at 8:43pm

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;