It seems if you do not set SupportsRegEx to true, the additional settings are not created. If i set SupportsRegEx to true in my constructor, the settings are loaded.
Is this by design? Smells like a bug to me
Updated code below.
publicclassInput : FieldType
{
public Input()
{
Id = new Guid("7D94EAA1-D277-487C-8ED0-FA666AADD41D");
Name = "Input";
Description = "Renders an input control according to the provided input type";
Icon = "/umbraco/Plugins/umbracoContour/images/fieldtypes/textfield.png";
DataType = FieldDataType.String;
SupportsRegex = true;
}
[Setting("InputType", description = "Type of input control to render", control = "Umbraco.Forms.Core.FieldSetting.TextField")]
publicstring InputType { get; set; }
publicoverridestring RenderPreview()
{
return"<input type=\"" + InputType + "\" class=\"textfield\" value=\"[email protected]\" />";
}
publicoverridestring RenderPreviewWithPrevalues(List<object> prevalues)
{
return RenderPreview();
}
}
Setting in custom field type not appearing in 'AdditionalSettings' property
Hi,
I am trying out creating a custom field type. I followed the example in this post here.
However, when I debug my view, the Additional Settings property is always empty. Is there something im missing?
Any help is much appreciated!
FieldType Source
It seems if you do not set SupportsRegEx to true, the additional settings are not created. If i set SupportsRegEx to true in my constructor, the settings are loaded.
Is this by design? Smells like a bug to me
Updated code below.
Comment author was deleted
Yeah that's definitly a bug, added to our issue tracker, thanks for reporting! http://issues.umbraco.org/issue/CON-372
is working on a reply...