Skip to content

Commit 590fc51

Browse files
committed
Fix empty fields pb with HtmlDropdown
1 parent e38ed86 commit 590fc51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Ajax/semantic/widgets/base/FieldAsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public function fieldAsCheckbox($index, $attributes = NULL) {
261261

262262
public function fieldAsDropDown($index, $elements = [], $multiple = false, $attributes = NULL) {
263263
return $this->_fieldAs(function ($id, $name, $value, $caption) use ($elements, $multiple, $attributes) {
264-
$dd = new HtmlFormDropdown($id, $elements, $caption, $value);
264+
$dd = new HtmlFormDropdown($id, $elements, $caption, $value ?? '');
265265
$dd->asSelect($name, $multiple);
266266
return $this->_prepareFormFields($dd, $name, $attributes);
267267
}, $index, $attributes, "dd");

0 commit comments

Comments
 (0)