PHPackages                             bratiask/silverstripe-pickerfield - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bratiask/silverstripe-pickerfield

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

bratiask/silverstripe-pickerfield
=================================

GridField based management of has\_one , has\_many , and many\_many relationship selection

5.0.0(2y ago)0194↓75%BSD-3-ClausePHP

Since Dec 21Pushed 2y agoCompare

[ Source](https://github.com/bratiask/silverstripe-pickerfield)[ Packagist](https://packagist.org/packages/bratiask/silverstripe-pickerfield)[ Docs](https://github.com/briceburg/silverstripe-pickerfield)[ RSS](/packages/bratiask-silverstripe-pickerfield/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

silverstripe-pickerfield
========================

[](#silverstripe-pickerfield)

SilverStripe 3 GridField based management of has\_one , has\_many , and many\_many relationship selection

Requirements
------------

[](#requirements)

- SilverStripe &gt;= 3.1
- Andrew Short's GridFieldExtensions \[  \]

Why?
----

[](#why)

1. An efficient\* GridField based interface to manage relationship selections.
2. GridField doesn't appear to natively support has\_one relationships.
3. The ability to edit and create selected items.

Thanks to the great work of the SilverStripe team and Andrew Short's GridFieldExtensions, the development of this module was a bit easier. Be kind to them.

\* by efficient we needed ajax + pagination, as we couldn't load all records into a dropdown list for instance.

Usage Overview
--------------

[](#usage-overview)

Screenshots; ###overview [![overview](https://github.com/briceburg/silverstripe-pickerfield/raw/master/docs/screenshots/pickerfield.png?raw=true)](https://github.com/briceburg/silverstripe-pickerfield/blob/master/docs/screenshots/pickerfield.png?raw=true)\###link button search \[via GridFieldExtensions\] [![link button search [via GridFieldExtensions]](http://github.com/briceburg/silverstripe-pickerfield/blob/master/docs/screenshots/add-existing-search.png?raw=true)](http://github.com/briceburg/silverstripe-pickerfield/blob/master/docs/screenshots/add-existing-search.png?raw=true)

```
/***********************
	Mock DataObject
************************/

class Dog extends DataObject {
	static $db = array(
		'Title'				=> 'Varchar',
		// ....
	);

	static $has_one = array(
		'Breeder'			=> 'Breeder'
		'Dam'				=> 'Dog',
		'Sire'				=> 'Dog',
		// ....
	);

	static $has_many = array(
		'Owners'	=> 'Member',
		// ....
	);

// ....

}

/***********************
	Field Usage
************************/

// sortable field appropriate for selection of has_many and many_many objects
$field = new PickerField('Owners', 'Owners', $this->Owners(), 'Select Owner(s)', 'SortOrder');

// non-sortable version of the above
$field = new PickerField('Owners', 'Owners', $this->Owners());

// sortable field appropriate for the parent selection of a has_one relationship
$field = new HasOnePickerField($this, 'DamID', 'Selected Dam', $this->Dam(), 'Select a Dam');

// we also allow the ability to create and edit associated records via enableCreate, enableEdit methods.
$fields->addFieldsToTab('Root.Main', array(
  new HeaderField('Info','Info Blocks'),
  $field = new HasOnePickerField($this, 'AboutInfoBlockID', 'About Block', $this->AboutInfoBlock())
));

$field->enableCreate('Add Block')->enableEdit();

```

Bugs
----

[](#bugs)

For support or questions, please use the GitHub provided issue tracker;

-

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

871d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ecc43b18c936c2a01ae1e5cab0cea0f56a42a34d43f826aefdf5fdf22c27bbf?d=identicon)[bratiask](/maintainers/bratiask)

---

Top Contributors

[![briceburg](https://avatars.githubusercontent.com/u/490144?v=4)](https://github.com/briceburg "briceburg (32 commits)")[![wilr](https://avatars.githubusercontent.com/u/101629?v=4)](https://github.com/wilr "wilr (12 commits)")[![pavol-tuka](https://avatars.githubusercontent.com/u/30590523?v=4)](https://github.com/pavol-tuka "pavol-tuka (2 commits)")[![wernerkrauss](https://avatars.githubusercontent.com/u/1043925?v=4)](https://github.com/wernerkrauss "wernerkrauss (2 commits)")[![lozcalver](https://avatars.githubusercontent.com/u/1655548?v=4)](https://github.com/lozcalver "lozcalver (1 commits)")[![dospuntocero](https://avatars.githubusercontent.com/u/123972?v=4)](https://github.com/dospuntocero "dospuntocero (1 commits)")[![gordonbanderson](https://avatars.githubusercontent.com/u/7060?v=4)](https://github.com/gordonbanderson "gordonbanderson (1 commits)")

---

Tags

silverstripegridfieldhas\_one

### Embed Badge

![Health badge](/badges/bratiask-silverstripe-pickerfield/health.svg)

```
[![Health](https://phpackages.com/badges/bratiask-silverstripe-pickerfield/health.svg)](https://phpackages.com/packages/bratiask-silverstripe-pickerfield)
```

###  Alternatives

[symbiote/silverstripe-gridfieldextensions

A collection of useful grid field components

971.8M233](/packages/symbiote-silverstripe-gridfieldextensions)[undefinedoffset/sortablegridfield

Adds drag and drop functionality to Silverstripe's GridField

941.2M50](/packages/undefinedoffset-sortablegridfield)[unclecheese/betterbuttons

Adds new form actions and buttons to GridField detail form for usability enhancements.

85544.9k19](/packages/unclecheese-betterbuttons)[briceburg/silverstripe-pickerfield

GridField based management of has\_one , has\_many , and many\_many relationship selection

2541.2k1](/packages/briceburg-silverstripe-pickerfield)[webbuilders-group/silverstripe-frontendgridfield

Wraps gridfield adding support for using it on the front-end.

2029.8k1](/packages/webbuilders-group-silverstripe-frontendgridfield)[milkyway-multimedia/ss-gridfield-utils

A collection of GridField components that you can use with any GridField, including Editable Rows and amy more

207.3k2](/packages/milkyway-multimedia-ss-gridfield-utils)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
