diff --git a/rundeckapp/grails-app/assets/javascripts/optionEditKO.js b/rundeckapp/grails-app/assets/javascripts/optionEditKO.js
index <HASH>..<HASH> 100644
--- a/rundeckapp/grails-app/assets/javascripts/optionEditKO.js
+++ b/rundeckapp/grails-app/assets/javascripts/optionEditKO.js
@@ -25,9 +25,10 @@ function OptionEditor(data) {
     self.showDefaultValue = ko.observable(data.showDefaultValue);
     self.defaultValue = ko.observable(data.defaultValue);
     self.optionType = ko.observable(data.optionType);
-    self.name=ko.observable(data.name);
+    self.name = ko.observable(data.name);
     self.bashVarPrefix= data.bashVarPrefix? data.bashVarPrefix:'';
     self.enforceType = ko.observable(data.enforceType);
+    self.originalIsNonSecure = data.showDefaultValue;
     self.tofilebashvar = function (str) {
         return self.bashVarPrefix + "FILE_" + str.toUpperCase().replace(/[^a-zA-Z0-9_]/g, '_').replace(/[{}$]/, '');
     };
@@ -73,4 +74,7 @@ function OptionEditor(data) {
     self.isNonSecure = ko.computed(function(){
         return JSON.parse(self.showDefaultValue());
     });
+    var subscription = this.optionType.subscribe(function(newValue) {
+        self.showDefaultValue(self.originalIsNonSecure);
+    });
 }
when playing around with option type, original input type and default value type is holded