diff --git a/CHANGELOG.md b/CHANGELOG.md index 65a67347..42d4784c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASE] - Fix incompatibility of `multiple` dropdowns with `massiveaction` +- Fix default value properly applied in multiple dropdown search options ## [1.21.22] - 2025-05-28 diff --git a/inc/abstractcontainerinstance.class.php b/inc/abstractcontainerinstance.class.php index 87ebcbd5..64678aee 100644 --- a/inc/abstractcontainerinstance.class.php +++ b/inc/abstractcontainerinstance.class.php @@ -159,7 +159,11 @@ public static function getSpecificValueToDisplay($field, $values, array $options ) { $itemtype = PluginFieldsDropdown::getClassname($field_specs->fields['name']); if (empty($values[$field])) { - return ''; // Value not defined + if (!empty($field_specs->fields["default_value"])) { + $values[$field] = $field_specs->fields['default_value']; + } else { + return ''; // Value not defined + } } $values = json_decode($values[$field]); if (!is_array($values)) {