Skip to content

Commit

Permalink
DOC Add UrlField
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jan 30, 2024
1 parent a648bbb commit d973593
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions en/04_Changelogs/5.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ title: 5.2.0 (unreleased)
- [Create random passwords for new users](#create-random-passwords-for-new-users)
- [Buttons to select all files and deselect all files](#bulk-action-buttons)
- [New searchable dropdown fields](#searchable-dropdown-field)
- [New `UrlField`](#urlfield)
- [Create file variants with different extensions](#file-variants)
- [More nuanced permissions for `/dev/*` routes](#dev-route-permissions)
- [Generic typehints](#generics)
Expand Down Expand Up @@ -182,6 +183,10 @@ Both of these fields include a `setIsLazyLoaded()` method which will load a limi

Note that these are both powered by react components, and are only intended to be used within the CMS. If you want to use them on the front-end of your project you will need to provide your own templates and JavaScript implementation for them.

### New `UrlField` {#urlfield}

A new [`UrlField`](api:SilverStripe\Forms\UrlField) has been added which is a subclass of [`TextField`](api:SilverStripe\Forms\TextField) with some additional validation rules. It will validate that the value entered is a valid absolute URL with a protocol and a host.

#### Auto scaffolding of `has_one` relations

A `SearchableDropdownField` will now be used when automatically scaffolding `has_one` relations on a form in the CMS. Previously a `DropdownField` was used, and when there were over 100 items a [`NumericField`](api:SilverStripe\Forms\NumericField) was used which was not user friendly.
Expand Down

0 comments on commit d973593

Please sign in to comment.