diff --git a/en/08_Changelogs/6.0.0.md b/en/08_Changelogs/6.0.0.md index 2247e952c..5c43589d8 100644 --- a/en/08_Changelogs/6.0.0.md +++ b/en/08_Changelogs/6.0.0.md @@ -8,6 +8,7 @@ title: 6.0.0 (unreleased) - [Features and enhancements](#features-and-enhancements) - [Run `CanonicalURLMiddleware` in all environments by default](#url-middleware) + - [Changes to scaffolded form fields](#scaffolded-fields) - [Other new features](#other-new-features) - [Bug fixes](#bug-fixes) - [API changes](#api-changes) @@ -31,6 +32,27 @@ CanonicalURLMiddleware::singleton()->setEnabledEnvs([ ]); ``` +### Changes to scaffolded form fields {#scaffolded-fields} + +Some of the form fields have changed when scaffolding form fields for relations. + +Previously, `File`, `Image`, and `Folder` were all scaffolded using `UploadField` for `has_one` relations, and `GridField` for `has_many` and `many_many` relations. + +All other models used `SearchableDropdownField` for `has_one` relations and `GridField` for `has_many` and `many_many` relations. + +|Class|`has_one`|`has_many`|`many_many`| +|---|---|---|---| +|[`SiteTree`](api:SilverStripe\CMS\Model\SiteTree)|[`TreeDropdownField`](api:SilverStripe\Forms\TreeDropdownField)|[`TreeMultiselectField`](api:SilverStripe\Forms\TreeMultiselectField)|[`TreeMultiselectField`](api:SilverStripe\Forms\TreeMultiselectField)| +|[`Group`](api:SilverStripe\Security\Group)|[`TreeDropdownField`](api:SilverStripe\Forms\TreeDropdownField)|[`TreeMultiselectField`](api:SilverStripe\Forms\TreeMultiselectField)|[`TreeMultiselectField`](api:SilverStripe\Forms\TreeMultiselectField)| +|[`Member`](api:SilverStripe\Security\Member)|No change|[`SearchableMultiDropdownField`](api:SilverStripe\Forms\SearchableMultiDropdownField)|[`SearchableMultiDropdownField`](api:SilverStripe\Forms\SearchableMultiDropdownField)| +|[`File`](api:SilverStripe\Assets\File)|No change|[`UploadField`](api:SilverStripe\AssetAdmin\Forms\UploadField)|[`UploadField`](api:SilverStripe\AssetAdmin\Forms\UploadField)| +|[`Image`](api:SilverStripe\Assets\Image)|No change|[`UploadField`](api:SilverStripe\AssetAdmin\Forms\UploadField)|[`UploadField`](api:SilverStripe\AssetAdmin\Forms\UploadField)| +|[`Folder`](api:SilverStripe\Assets\Folder)|[`TreeDropdownField`](api:SilverStripe\Forms\TreeDropdownField)|[`TreeMultiselectField`](api:SilverStripe\Forms\TreeMultiselectField)|[`TreeMultiselectField`](api:SilverStripe\Forms\TreeMultiselectField)| +|[`TaxonomyTerm`](api:SilverStripe\Taxonomy)|No change|[`SearchableMultiDropdownField`](api:SilverStripe\Forms\SearchableMultiDropdownField)|[`SearchableMultiDropdownField`](api:SilverStripe\Forms\SearchableMultiDropdownField)| +|[`Link`](api:SilverStripe\LinkField\Models\Link)|[`LinkField`](api:SilverStripe\LinkField\Form\LinkField)|[`MultiLinkField`](api:SilverStripe\LinkField\Form\MultiLinkField)|No change| +|[`BlogCategory`](api:SilverStripe\Blog\Model\BlogCategory)|No change|[`TagField`](api:SilverStripe\TagField\TagField)|[`TagField`](api:SilverStripe\TagField\TagField)| +|[`BlogTag`](api:SilverStripe\Blog\Model\BlogTag)|No change|[`TagField`](api:SilverStripe\TagField\TagField)|[`TagField`](api:SilverStripe\TagField\TagField)| + ### Other new features - Native indexed PHP arrays can now be passed into templates and iterated over with `<% loop $MyArray %>`. Under the hood they are wrapped in [`ArrayList`](api:SilverStripe\View\ViewableData), so you can get the count using `$Count` and use `<% if $ArrayList %>` as a shortcut for `<% if $ArrayList.Count %>`. Other functionality from `ArrayList` such as filtering and sorting cannot be used on arrays since they don't have keys to filter or sort against.