diff --git a/modules/json_form_widget/src/WidgetRouter.php b/modules/json_form_widget/src/WidgetRouter.php index e46ea481c3..25e3733c1a 100644 --- a/modules/json_form_widget/src/WidgetRouter.php +++ b/modules/json_form_widget/src/WidgetRouter.php @@ -174,7 +174,9 @@ public function handleListElement($spec, array $element) { */ public function getDropdownElement($element, $spec, $titleProperty = FALSE) { $element['#type'] = $this->getSelectType($spec); - $element['#options'] = $this->getDropdownOptions($spec->source, $titleProperty); + if (isset($spec->source)) { + $element['#options'] = $this->getDropdownOptions($spec->source, $titleProperty); + } if ($element['#type'] === 'select_or_other_select') { $element = $this->handleSelectOtherDefaultValue($element, $element['#options']); $element['#input_type'] = isset($spec->other_type) ? $spec->other_type : 'textfield';