feat(18-04): settings forms take method-backed dropdown options from the settings model (task 1)
- the settings schema passes the settings model as the DropdownOptionsProvider - boot refuses a dropdown method on a settings model without DropdownOptions - cabana README and docs/backend/settings.md describe it
This commit is contained in:
@@ -62,6 +62,8 @@ fields:
|
||||
span: right
|
||||
```
|
||||
|
||||
A dropdown whose `options` names a method (`options: getCurrencyOptions`) takes its choices from the settings model, as a WinterCMS settings model's `get*Options` method did. The model implements `pact.DropdownOptionsProvider`; `DropdownOptions` receives the field name and returns `pact.Option` values whose labels may be phrase keys. A settings model without it stops the start-up naming the field.
|
||||
|
||||
Create the table in a migration like any other; see [Migrations](../database/migrations.md).
|
||||
|
||||
## Linking a settings entry to an admin controller
|
||||
|
||||
Reference in New Issue
Block a user