Created
May 20, 2015 13:23
-
-
Save TimGeyssens/38bd409d4c8c288e6555 to your computer and use it in GitHub Desktop.
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 Textfield : FieldType | |
{ | |
[Attributes.Setting("DefaultValue", | |
description = "Enter a default value")] | |
public string DefaultValue { get; set; } | |
public Textfield() { | |
//Provider | |
this.Id = new Guid("3F92E01B-29E2-4a30-BF33-9DF5580ED52C"); | |
this.Name = "Textfield"; | |
this.Description = "Renders a html input fieldKey"; | |
//FieldType | |
this.Icon = "icon-autofill"; | |
this.DataType = FieldDataType.String; | |
this.Category = "Simple"; | |
this.SortOrder = 10; | |
} | |
public override bool SupportsRegex | |
{ | |
get | |
{ | |
return true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @tim
It possible to create extra settings field is mandatory ?
[Umbraco.Forms.Core.Attributes.Setting("Policy", prevalues = "", description = "Enter the policy to show in the checkbox", view = "TextField")]
public string Policy { get; set; }
Regards,
Ivan S