OptionalTreeDropdownField extends Silverstripe TreeDropdownField to allow clearing a selection
PHP
Latest commit baddcbc Apr 6, 2016 @richardsjoqvist Merge pull request #7 from patricknelson/master
Fixing package name in install instructions.

README.md

SilverStripe OptionalTreeDropdownField

This module extends SilverStripe TreeDropdownField to allow clearing a selection.

Requirements

  • SilverStripe 3.1 (or higher)

Installation

  1. Run composer require richardsjoqvist/silverstripe-optionaltreedropdownfield
  2. Run sake /dev/build

Usage

$fields = new FieldList();  
$treeField = new OptionalTreeDropdownField('MyFieldID', 'My Field Title', 'SiteTree');  
$treeField->setEmptyString('No page');
$fields->push($treeField);