Skip to content

Commit

Permalink
Merge pull request #450 from creative-commoners/pulls/5/url-field
Browse files Browse the repository at this point in the history
DOC Add UrlField
  • Loading branch information
GuySartorelli authored Feb 6, 2024
2 parents 4a59b47 + d973593 commit bdff72e
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 @@ -15,6 +15,7 @@ title: 5.2.0 (unreleased)
- [Buttons to select all files and deselect all files](#bulk-action-buttons)
- [Support for validation using `symfony/validator`](#symfony-validator)
- [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 @@ -208,6 +209,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 bdff72e

Please sign in to comment.