Last active
November 28, 2018 14:38
-
-
Save fluxdigital/91adcc1cdee678de66c81c4e2784e400 to your computer and use it in GitHub Desktop.
Custom WFFM dropdown list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomDropDownList : DropList | |
{ | |
private static readonly string BaseCssClassName = "scfCustomlistBorder"; | |
[ParameterName("emptychoicetext")] | |
[VisualCategory("Custom")] | |
[VisualProperty("Empty Choice Text:")] | |
public string EmptyChoiceText { get; set; } | |
[ParameterName("showemptychoice")] | |
[VisualCategory("Custom")] | |
[VisualFieldType(typeof(BooleanField))] | |
[VisualProperty("Show Empty Choice:")] | |
public bool ShowEmptyChoice { get; set; } | |
[ParameterName("initialselection")] | |
[VisualCategory("Custom")] | |
[VisualProperty("Initial Selection:")] | |
public string InitialSelection { get; set; } | |
[VisualFieldType(typeof(CssClassField))] | |
[DefaultValue("scfCustomlistBorder")] | |
[VisualProperty("CSS Class:", 600)] | |
public new string CssClass | |
{ | |
get { return base.CssClass; } | |
set { base.CssClass = value; } | |
} | |
//blank out inheritted properties | |
public new ListItemCollection Items | |
{ | |
get { return this.items; } | |
set { this.items = value; } | |
} | |
public new string EmptyChoice | |
{ | |
get { return false.ToString(); } | |
} | |
public new ListItemCollection SelectedValue | |
{ | |
get { return this.selectedItems; } | |
set { this.selectedItems = value; } | |
} | |
protected override void InitItems(ListItemCollection items) | |
{ | |
base.InitItems(items); | |
} | |
protected override void DoRender(HtmlTextWriter writer) | |
{ | |
base.DoRender(writer); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment