diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index 85e0eeb60b..1a8d061cb9 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -162,7 +162,15 @@ var et2_selectbox = et2_inputWidget.extend({ { option.attr("title", _title); } - option.appendTo(this.input); + if(_label == this.options.empty_label || this.options.empty_label == "" && _value == "") + { + // Make sure empty / all option is first + option.prependTo(this.input); + } + else + { + option.appendTo(this.input); + } }, /**