Closed jgonyea closed 2 years ago
Browser: Firefox (Win x64)
PHP 7.4.26 Grav 1.7.30 Form 5.1.6 Admin 1.10.30
Seems that the validate.type: array
is not working properly. If that option is broken onto multiple lines like:
vaidate:
type: array
then the saving works properly. The Learn site should be updated to reflect this.
Thanks to Djamil on Discord for finding the issue.
@mahagr is this a valid issue or is it a deprecated usage of dot-chained properties? If that's the case can you update the docs, as it appears to be misleading with the information.
If not a bug, @jgonyea kindly provided a PR for this: https://github.com/getgrav/grav-learn/pull/973
It's just a documentation issue.
tl;dr: Select form field saving is broken if
multiple
is setI'm attempting to add a multiple select to my plugin configuration blueprints.yaml file. In my file, I add the following:
as a sibling of
enabled
. Viewing the admin configuration of the plugin displays the select field as expected, and I can select multiple options. After pressing save, the field "page_types" is saved in theuser/config/plugins/PLUGINNAME.yaml
aspage_types: ''
(e.g. with no data).