diff --git a/lam/lib/html.inc b/lam/lib/html.inc index f4546b4f..a04f3a9b 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -1273,13 +1273,13 @@ class htmlSelect extends htmlElement { foreach ($elements as $key => $value) { $selected = ''; if ($this->hasDescriptiveElements) { - if (in_array($value, $this->selectedElements)) { + if (in_array($value, $this->selectedElements) || (empty($this->selectedElements) && empty($value))) { $selected = ' selected'; } echo "\n"; } else { - if (in_array($value, $this->selectedElements)) { + if (in_array($value, $this->selectedElements) || (empty($this->selectedElements) && empty($value))) { $selected = ' selected'; } echo "" . htmlspecialchars($value) . "\n";