diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js index 669c7a70623ae0381d4d5d361965f480a12d8561..99898c52ea0d1bde13a65d4319564cae50437683 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js @@ -1026,10 +1026,12 @@ var FormUtil = new function() { $component.append($("<option>").attr('value', '').attr('selected', '').attr('disabled', '').text(alt)); $component.append($("<option>").attr('value', '').text('(empty)')); - + var $options = []; for(var i = 0; i < terms.length; i++) { - $component.append($("<option>").attr('value',terms[i].code).text(terms[i].label)); + var $option = $("<option>", { value : terms[i].code }).text(terms[i].label); + $options.push($option); } + $component.append($options); Select2Manager.add($component); return $component; }