Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ntd/silverstripe-gridfieldaddfromlist

A GridField component that allows to add rows to a specific relation set
https://github.com/ntd/silverstripe-gridfieldaddfromlist

gridfield module silverstripe silverstripe-module

Last synced: 2 months ago
JSON representation

A GridField component that allows to add rows to a specific relation set

Awesome Lists containing this project

README

        

SilverStripe GridFieldAddFromList
=================================

This module provides a new `GridField` component that allows to add rows
to a grid only after setting a relation.

![Screenshot of GridFieldAddFromList](docs/en/screenshot.png)

This is quite similar to what already done by stock
`GridFieldAddExistingAutocompleter` but with a few important
differences:

1. the relation is set by leveraging a standard `DropdownField`;
2. any relation can be handled (check `setTargetField()`);
3. the same item can be added more than once (check `setUnique()`).

This can be useful in contexts where `GridFieldAddExistingAutocompleter`
cannot be used, e.g. setting an **has-one** relation or linking the same
item more than once in **many-many** relations.

Installation
------------

composer require entidi/silverstripe-gridfieldaddfromlist

Other documentation
-------------------

* [Usage](docs/en/usage.md)
* [Contributing](CONTRIBUTING.md)
* [Code of Conduct](https://docs.silverstripe.org/en/contributing/code_of_conduct)
* [BSD license](LICENSE.md)
* [Support](docs/en/support.md)