Skip to content

Commit

Permalink
DOC Fix placement of urlfield docs (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Feb 23, 2024
1 parent aa9ef53 commit 621a9f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions en/08_Changelogs/5.2.0.md
Expand Up @@ -266,16 +266,16 @@ 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.

Previously the [`DBForeignKey.dropdown_field_threshold`](api:SilverStripe\ORM\FieldType\DBForeignKey->dropdown_field_threshold) config property was used as the threshold of the number of options to decide when to switch between auto-scaffolding a `DropdownField` and a `NumericField`. This configuration property is now used as the threshold of the number of options to decide when to start using lazy-loading for the `SearchableDropdownField`.

### 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.

### Create file variants with different extensions {#file-variants}

A low-level API has been added which allows the creation of file variants with a different extension than the original extension. A file variant is a manipulated version of the original file - for example if you resize an image or convert a file to another format, this will generate a variant (leaving the original file intact).
Expand Down

0 comments on commit 621a9f4

Please sign in to comment.