Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Provides a set of form fields for searching through and selecting objects.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 code
Octocat-spinner-32 css
Octocat-spinner-32 docs
Octocat-spinner-32 javascript
Octocat-spinner-32 templates ENHANCEMENT: Added the ability to confirm actions before executing, a… April 05, 2011
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 _config.php
README.md

SilverStripe Item Set Field Module

This module provides a number of useful form fields for managing relationships by searching through a list of candidates and selecting the one(s) you want.

Maintainer Contacts

Requirements

  • SilverStripe 2.4+

Installation

  • Place this directory in the root of your SilverStripe installation. Ensure that the folder name is itemsetfield.
  • Regenerate the manifest cache by visiting any page on your site with the ?flush URL parameter set.

Usage Overview

This module provides three main form fields - HasOnePickerField, HasManyPickerField and ManyManyPickerField for managing objects acoss has_one, has_many and many_many relationships respectively.

For basic usage, just use the appropriate form field for your relationship type, and pass the constructor the parent object as the first argument, the relationship name as the second and optional field title as the third.

public function getCMSFields() {
    $fields = parent::getCMSFields();
    $fields->addFieldToTab('Root.Content.HasMany', new HasManyPickerField(
        $this, 'HasManyRelationshipName'
    ));
    return $fields;
}

For more advanced usage all fields accept an array of config options as the fourth constructor argument. See individual fields for what options are available.

Links

Something went wrong with that request. Please try again.