Skip to content

Commit

Permalink
Follow same structure as other fields
Browse files Browse the repository at this point in the history
  • Loading branch information
janette committed Dec 21, 2022
1 parent 80965d2 commit e58a5bc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/json_form_widget/src/WidgetRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,8 @@ public function getDropdownElement($element, $spec, $titleProperty = FALSE) {
$element = $this->handleSelectOtherDefaultValue($element, $element['#options']);
$element['#input_type'] = isset($spec->other_type) ? $spec->other_type : 'textfield';
}
if (!isset($element['#other_option'])) {
$element['#other_option'] = '';
}
$element['#other_option'] = isset($element['#other_option']) ? $element['#other_option'] : FALSE;

if ($element['#type'] === 'select2') {
$element['#multiple'] = isset($spec->multiple) ? TRUE : FALSE;
$element['#autocreate'] = isset($spec->allowCreate) ? TRUE : FALSE;
Expand Down

0 comments on commit e58a5bc

Please sign in to comment.