From 23ab698665295678f6a7fa1fbfddf23c3e3d7799 Mon Sep 17 00:00:00 2001 From: starfighter83 Date: Tue, 26 Jul 2011 08:31:07 -0200 Subject: [PATCH] Adds default value support to Field data editor setting type --- components/editorControls/SettingControls/Pickers/Field.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/editorControls/SettingControls/Pickers/Field.cs b/components/editorControls/SettingControls/Pickers/Field.cs index 4aa88eaa2e..b0080a53d8 100644 --- a/components/editorControls/SettingControls/Pickers/Field.cs +++ b/components/editorControls/SettingControls/Pickers/Field.cs @@ -55,7 +55,10 @@ namespace umbraco.editorControls.SettingControls.Pickers li.Selected = true; ddl.Items.Insert(0, li); - ddl.SelectedValue = _val; + if (string.IsNullOrEmpty(_val) && !string.IsNullOrEmpty(DefaultValue)) + ddl.SelectedValue = DefaultValue; + else + ddl.SelectedValue = _val; return ddl; }