Use localization strings for dropdown-like field options. (#910)

Documented by https://github.com/wintercms/docs/pull/133
This commit is contained in:
Marc Jauvin 2023-07-27 13:21:24 -04:00 committed by GitHub
parent 71479dd51d
commit a32b6b7cae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1343,6 +1343,11 @@ class Form extends WidgetBase
]));
}
return $result;
} else {
// Handle localization keys that return arrays
if (is_array($options = Lang::get($fieldOptions))) {
return $options;
}
}
}