PHPackages                             maxime-rainville/anyfield - 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. maxime-rainville/anyfield

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

maxime-rainville/anyfield
=========================

Add Silverstripe CMS field that can be used to manage any relation

0.0.0(2y ago)32.0k2[17 issues](https://github.com/maxime-rainville/silverstripe-anyfield/issues)[8 PRs](https://github.com/maxime-rainville/silverstripe-anyfield/pulls)6BSD-3-ClausePHPPHP ^8.1

Since Aug 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/maxime-rainville/silverstripe-anyfield)[ Packagist](https://packagist.org/packages/maxime-rainville/anyfield)[ RSS](/packages/maxime-rainville-anyfield/feed)WikiDiscussions 0 Synced yesterday

READMEChangelog (1)Dependencies (9)Versions (10)Used By (6)

Silverstripe CMS AnyField module
================================

[](#silverstripe-cms-anyfield-module)

This module provides two simple form fields to manage has-one and has-many relations for a parent record.

`AnyField` and `ManyAnyField` are best suited to managing simple DataObjects that are tightly coupled to their owner. This module will not work well for DataObjects with complex relations.

[`silverstripe/linkfield`](https://github.com/silverstripe/silverstripe-linkfield) is a great complement to the `AnyField`.

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

[](#installation)

```
composer require maxime-rainville/anyfield
```

This module require Silverstripe CMS 5 or greater.

Showcase
--------

[](#showcase)

    Screencast.from.10-08-23.21.46.36.webm    - Manage `has_one` or `has_many` relations with ease
- Manage multiple Dataobject classes from a single field
- Allow your content authors to edit your child DataObjects from a modal within their parent page
- Works in regular Entwine forms and Elemental blocks.

Sample usage
------------

[](#sample-usage)

```
