diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js
index 1591a4d34..c7b4ea99a 100644
--- a/web/pgadmin/static/js/backform.pgadmin.js
+++ b/web/pgadmin/static/js/backform.pgadmin.js
@@ -1274,5 +1274,21 @@
return groups;
};
+ /*
+ * Backform Select2 control.
+ */
+ var Select2Control = Backform.Select2Control = Backform.SelectControl.extend({
+ render: function() {
+ Backform.SelectControl.prototype.render.apply(this, arguments);
+
+ var col = _.defaults(this.field.toJSON(), this.defaults)
+ /*
+ * Add empty option as Select2 requires any empty '')).select2(col.select2);
+ return this;
+ }
+ });
return Backform;
}));