Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Add UrlField #450

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading